timer_gettime(3C) timer_gettime(3C)
timer_gettime - get the time remaining before posix timer expiration
#include <time.h>
int timer_gettime (timer_t timerid<b>, struct itimerspec *value<b>);
timer_gettime retrieves the time remaining before the posix timer named
by timerid expires, as well as, the periodic timer interval between
expirations and stores the information at memory address value.
The it_value field of value contains the time remainder, while the
it_interval field contains the periodic timer interval. If it_value
contains zero after a successful return, then the timer is disarmed. If
it_interval contains zero after a successful return, then the timer is
not periodic.
timer_gettime will fail if one or more of the following are true:
[EINVAL] The timerid does not name a valid posix timer.
[EFAULT] The address specified by value is outside the range of the
address space of the calling process.
timer_create(3C), timer_delete(3C), timer_getoverrun(3C),
timer_settime(3C), clock_settime(2), clock_gettime(2), clock_getres(2),
getitimer(2), setiitimer(2)
Upon successful completion, a value of 0 is returned to the calling
process. Otherwise, a value of -1 is returned and errno is set to
indicate the error.
PPPPaaaaggggeeee 1111 [ Back ]
|