difftime

From cppreference.com
< c | chrono
Defined in header <time.h>
double difftime( time_t time2, time_t time1 );

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

Contents

[edit] Parameters

time1, time2 - times to compare

[edit] Return value

difference between two times in seconds

[edit] Example