clock_gettime(2) DG/UX R4.11MU05 clock_gettime(2)
NAME
clock_gettime - get the time of the system clock
SYNOPSIS
#include <time.h>
int clock_gettime (clock_id, *tp)
clock_t clock_id;
struct timespec *tp;
DESCRIPTION
Use clock_gettime(2) to get the time tp (in seconds and nanoseconds)
of the system-wide realtime clock. The value of clock_id must be
CLOCK_REALTIME.
Note
* This routine is based on POSIX realtime extension document P1003.4
draft 14. It is therefore subject to change.
* Compilation of a source file using this routine requires that
feature macro _POSIX4_DRAFT_SOURCE be defined. This feature macro
is not enabled by any other feature macro, nor does it enable any
other feature macro.
* The compiled routine must be linked to library librte.a.
RETURN VALUE
If successful, clock_gettime returns 0. If unsuccessful, the routine
returns -1 and sets ERRNO to:
EFAULT The address of tp is bad.
EINVAL The value of clock_id is not CLOCK_REALTIME.
SEE ALSO
clock_getres(2). timer_create(2), timer_delete(2), timer_settime(2),
timer_gettime(2), timer_getoverrun(2).
Licensed material--property of copyright holder(s)