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

  1. function t = etime(t1,t0)
  2. %ETIME    Elapsed time.
  3. %    ETIME(T1,T0) returns the time in seconds that has elapsed between
  4. %    vectors T1 and T0.  The two vectors must be six elements long, in
  5. %    the format returned by CLOCK:
  6. %
  7. %        T = [Year Month Day Hour Minute Second]
  8. %
  9. %    Here's an example of using ETIME to time an operation:
  10. %
  11. %      t0 = clock;
  12. %      operation
  13. %      etime(clock,t0)
  14. %
  15. %    Caution: As currently implemented, it won't work across month or year
  16. %    boundaries.  It is an M-file, so it can be fixed if you require this.
  17. %
  18. %    See also TIC, TOC, CLOCK, CPUTIME.
  19.  
  20. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  21.  
  22. t = (t1 - t0) * [0 0 86400 3600 60 1]';
  23.