The difftime function computes the difference between the two supplied time values timer0 and timer1.
double difftime( time_t timer1, time_t timer0 )
the elapsed time in seconds, from timer0 to timer1. The value returned is a double-precision floating-point number.
EX1
void difftime_ex1() { time_t start, finish; long loop; double result, elapsed_time; printf( "Multiplying 2 floating point numbers 100 thousand times...\n" ); time( &start ); for( loop = 0; loop < 100000; loop++ ) result = 3.63 * 5.27; time( &finish ); elapsed_time = difftime( finish, start ); printf( "\nProgram takes %6.0f seconds.\n", elapsed_time ); }
origin.h