DESCRIPTION
These macros are provided for manipulating timeval structures for use with the gettimeofday(2) and settimeofday(2) calls. The structure is defined in
.In sys/time.h as:
struct timeval {
long tv_sec; /* seconds since Jan. 1, 1970 */
long tv_usec; /* and microseconds */
};
timeradd adds the time information stored in a to b and stores the resulting
.Vt timeval in res. The results are simplified such that the value of res->tv_usec is always less than 1,000,000 (1 second).
timersub subtracts the time information stored in b from a and stores the resulting
.Vt timeval in res.
timerclear initializes tvp to midnight (0 hour) January 1st, 1970 (the Epoch).
timerisset returns true if tvp is set to any time value other than the Epoch.
timercmp compares a to b using the comparison operator given in CMP, and returns the result of that comparison.
SEE ALSO
gettimeofday(2)
HISTORY