difftime
From cppreference.com
Defined in header <time.h>
|
||
Computes difference between two calendar times as time_t objects (time_end - time_beg) in seconds. If time_end
refers to time point before time_beg
then the result is negative.
Parameters
time_beg, time_end | - | times to compare |
Return value
Difference between two times in seconds.
Notes
On POSIX systems, time_t is measured in seconds, and difftime
is equivalent to arithmetic subtraction, but C and C++ allow fractional units for time_t
.