DIFFTIME(3C) Standard C Library Functions DIFFTIME(3C)
difftime - computes the difference between two calendar times
#include <time.h>
double difftime(time_t time1, time_t time0);
The difftime() function computes the difference between two calendar
times.
The difftime() functions returns the difference (time1-time0)
expressed in seconds as a double.
The difftime() function is provided because there are no general
arithmetic properties defined for type time_t.
See attributes(7) for descriptions of the following attributes:
+--------------------+-----------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-----------------+
|Interface Stability | Standard |
+--------------------+-----------------+
|MT-Level | MT-Safe |
+--------------------+-----------------+
ctime(3C), attributes(7), standards(7)
July 24, 2002 DIFFTIME(3C)
NAME
difftime - computes the difference between two calendar times
SYNOPSIS
#include <time.h>
double difftime(time_t time1, time_t time0);
DESCRIPTION
The difftime() function computes the difference between two calendar
times.
RETURN VALUES
The difftime() functions returns the difference (time1-time0)
expressed in seconds as a double.
USAGE
The difftime() function is provided because there are no general
arithmetic properties defined for type time_t.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
+--------------------+-----------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-----------------+
|Interface Stability | Standard |
+--------------------+-----------------+
|MT-Level | MT-Safe |
+--------------------+-----------------+
SEE ALSO
ctime(3C), attributes(7), standards(7)
July 24, 2002 DIFFTIME(3C)