PreviousNext

The timespec Structure

The timespec structure is normally used in combination with or in place of the tm structure to provide finer resolution for binary times. The timespec structure is similar to the tm structure, but the timespec structure specifies the number of seconds and nanoseconds since the base time of 00:00:00 GMT, 1 January 1970. You can find the structure in the dce/utc.h header file.

The timespec structure declaration follows:

struct timespec {

time_t tv_sec; /* Seconds since 00:00:00 GMT, */

/* 1 January 1970 */

long tv_nsec; /* Additional nanoseconds since */

/* tv_sec */

} timespec_t;