timer_getres(3) — Subroutines
Digital
NAME
timer_getres − get the resolution for the specified timer (P1003.4/D10)
SYNOPSIS
#include <timers.h>
int timer_getres (
timer_t timerid ,
int abstime ,
struct timespec ∗res ,
struct timespec ∗max) ;
PARAMETERS
timerid The timer ID for which the resolution is obtained.
abstime Specifies whether the timer is an absolute or relative timer.
res A pointer to the timespec data structure that receives the value of the timer’s resolution.
max A pointer to the timespec data structure that receives the timer’s maximum possible time value.
DESCRIPTION
The timer_getres function returns the resolution value for the specified timer as well as the maximum possible time value. If either res or max are NULL, the corresponding value is not returned. If abstime is zero, the values returned are the limits that can be used for setting a relative timer. If abstime is not zero, the values returned represent the resolution and maximum value for setting an absolute timer. These values are not necessarily the same as the values returned for the corresponding clock resolution function, clock_getres. Also, the values returned by timer_getres may differ if the abstime value is set to either zero or non-zero.
RETURN VALUES
On a successful call, a value of 0 is returned.
On an unsuccessful call, a value of −1 is returned and errno is set to indicate that an error occurred.
ERRORS
The timer_getres function fails under the following conditions:
[EINVAL] The timerid argument does not correspond to an ID returned by timer_create, but not yet removed by timer_delete.
RELATED INFORMATION
alarm(3), clock_gettime(3), timer_create(3), timer_gettime(3), timer_settime(3)