| TIMESPEC_GET(3) | Library Functions Manual | TIMESPEC_GET(3) |
timespec_get —
#include <time.h>
int
timespec_get(struct
timespec *ts, int
base);
timespec_get function sets the interval pointed to
by ts to hold the current calendar time based on the
specified time base in base.
The base TIME_UTC returns the time since
the epoch. This time is expressed in seconds and nanoseconds since midnight
(0 hour), January 1, 1970. In NetBSD, this
corresponds to CLOCK_REALTIME.
timespec_get function returns the passed value of
base if successful, otherwise 0
on failure.
timespec_get function with a
base of TIME_UTC conforms to
ISO/IEC 9899:2011 (“ISO C11”).
| August 10, 2018 | NetBSD 9.2 |