std::difftime

From Cppreference

< cpp | chrono | c
Jump to: navigation, search
Defined in header <ctime>

double difftime( time_t time2, time_t time1 );

Computes difference between two calendar times as time_t objects (time2 - time1) in seconds.

[edit] Parameters

time1, time2 - times to compare

[edit] Return value

difference between two times in seconds

[edit] Example