etime
(Not recommended; use datetime
values or between
)
Time elapsed between date vectors
etime
is not recommended. Use datetime
values
instead. To calculate the elapsed time between two datetime
values,
either subtract one from the other or use the between
function. For
more information on updating your code, see Version History or Replace Discouraged Instances of Serial Date Numbers and Date Strings.
Syntax
Description
Examples
Input Arguments
Tips
To time the duration of an event, use the
timeit
ortic
andtoc
functions instead ofetime
andclock
. Theclock
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.
Algorithms
etime
does not account for the following:
Leap seconds
Daylight saving time adjustments
Differences in time zones
Extended Capabilities
Version History
Introduced before R2006aSee Also
cputime
| between
| datetime
| duration
| calendarDuration