Time elapsed between date vectors
To time the duration of an event, use the timeit
or tic
and toc
functions
instead of clock
and etime
.
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.