home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / ELMAT.DI$ / TOC.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  442 b   |  17 lines

  1. function t = toc
  2. %TOC    Read the stopwatch timer.
  3. %    TOC, by itself, prints the elapsed time since TIC was used.
  4. %    t = TOC; saves the elapsed time in t, instead of printing it out.
  5. %
  6. %    See also TIC, ETIME, CLOCK, CPUTIME.
  7.  
  8. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  9.  
  10. % TOC uses ETIME and the value of CLOCK saved by TIC.
  11. global TICTOC
  12. if nargout < 1
  13.    elapsed_time = etime(clock,TICTOC)
  14. else
  15.    t = etime(clock,TICTOC);
  16. end
  17.