1989-06-12 15:22:14 +00:00
|
|
|
/*
|
1989-12-18 15:33:48 +00:00
|
|
|
* difftime - compute the difference between two calendar times
|
1989-06-12 15:22:14 +00:00
|
|
|
*/
|
|
|
|
/* $Header$ */
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
double
|
|
|
|
difftime(time_t time1, time_t time0)
|
|
|
|
{
|
1990-01-22 13:08:36 +00:00
|
|
|
/* be careful: time_t is unsigned */
|
1989-06-12 15:22:14 +00:00
|
|
|
if (time0 > time1)
|
|
|
|
return - (double) (time0 - time1);
|
|
|
|
else return (double) (time1 - time0);
|
|
|
|
}
|