Time elapsed between date vectors
Note
While you can represent dates and times as date vectors, it is recommended
that you use datetime values to
represent points in time, and duration or calendarDuration values to
represent elapsed times.
e = etime( returns the number
of seconds between two date vectors or matrices of date vectors,
t2,t1)t1 and t2.
Note: To measure the time required to run code,
use timeit, or tic and toc, instead of
etime. For more information, see Tips.
To time the duration of an event, use the timeit or
tic and toc functions instead of
etime and clock. The
clock function is based on the system time, which can
be adjusted periodically by the operating system, and thus might not be reliable
in time comparison operations.
etime does not account for the following:
Leap seconds.
Daylight saving time adjustments.
Differences in time zones.