TIMESPEC_GET(3C) Standard C Library Functions TIMESPEC_GET(3C)

timespec_getget time information

#include <time.h>

timespec_get(struct timespec *ts, int base);

The () function provides access nanosecond resolution time. The meaning and source of time is defined by the base argument. The following values are defined for base:

Obtain the current time of day from the realtime clock on the system. It represents the amount of time in second and nanoseconds since the Epoch. This is logically equivalent to calling clock_gettime(3C) with .

For the definition of the structure, see time.h(3HEAD).

Upon successful completion, the timespec_get() function returns the passed in value of base. Otherwise, is returned to represent an error.

Unlike other functions, the timespec_get() function is not defined to set . However, the timespec_get() function will fail if:

clock_gettime(3C), time.h(3HEAD), attributes(7)

March 25, 2016 OmniOS