Comparing Two Times

To determine the difference in seconds between two times, call the time difference function, time_diff():

long time_diff(time1_stp, time2_stp, format_stp)
 
UCHAR *time1_stp;
/* First time string
*/
UCHAR *time2_stp;
/* Second time string
*/
UCHAR *format_stp;
/* Time format string to use
*/

This function converts both times to the number of elapsed seconds and finds the difference with the formula:

difference = time2 - time1


Home Contents Previous Next