clock_getres(3P4)
NAME
clock_getres − get resolution of clock
SYNOPSIS
#include <sys/types.h>
#include <time.h>
int clock_getres(clock_id, res)
int clock_id
struct timespec ∗res
DESCRIPTION
The clock_getres function returns the resolution of the specified POSIX.4 clock, clock_id. If the res argument is non-NULL, the resolution of the specified clock is returned. The only valid POSIX.4 clock ID is CLOCK_REALTIME.
The timespec structure definition is:
struct timespec {
time_t tv_sec; /∗ seconds ∗/
long tv_nsec; /∗ nanoseconds ∗/
}
RETURN VALUE
Upon successful completion, the clock_getres function returns a zero. If any of the following conditions occur, the clock_getres function shall return -1 and set errno to the corresponding value:
[EINVAL] The clock_id argument does not specify a known clock.
FILES
/usr/lib/libposix4.a
SEE ALSO
clock_gettime(3P4), clock_settime(3P4), timer_settime(3P4), timer_gettime(3P4), nanosleep(3P4).
WARNING
The interface to clock_getres is based on IEEE Draft Standard P1003.4/D12. This is an unapproved draft, subject to change. Use of information contained in this unapproved draft is at your own risk. This interface will change to reflect any changes made by future drafts of POSIX 1003.4.
CX/UX Programmer’s Reference Manual