clock_getres(2) DG/UX R4.11MU05 clock_getres(2)
NAME
clock_getres - get the resolution of the system clock
SYNOPSIS
#include <time.h>
int clockgetres (clockid, *res)
clockt clockid;
struct timespec *res;
DESCRIPTION
Use clockgetres(2) to get the resolution res (interval in
nanoseconds between clock resets) of the system-wide realtime clock,
virtual clock, or profiling clock. The realtime clock implements
timers that expire in real time. The virtual clock implements timers
that expire is user virtual time (while the process is running in
user space). The profiling clock implements timers that expire in
user profiling time (while the process is running in user or system
space). The value of clockid must be CLOCK_REALTIME, CLOCK_VIRTUAL,
or CLOCK_PROF.
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, clockgetres returns 0. If unsuccessful, the routine
returns -1 and sets ERRNO to:
EFAULT The address of res is bad.
EINVAL The value of clockid is not CLOCK_REALTIME, CLOCK_VIRTUAL,
or CLOCK_PROF.
SEE ALSO
clockgettime(2), timercreate(2), timerdelete(2), timersettime(2),
timergettime(2), timergetoverrun(2), setitimer(2), getitimer(2).
Licensed material--property of copyright holder(s)