get the amount of time left on a timer
#include <time.h> int timer_gettime( timer_t timerid, struct itimerspec *value );
The timer_gettime() function gets the amount of time left before the specified timer is to expire, along with the timer's reload value, and stores it in the space pointed to by the value argument. The timer is specified by timerid.
The itimerspec structure pointed to by value contains at least the following members:
See timer_create().
POSIX 1003.4
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
clock_getres(), clock_gettime(), clock_setres(), clock_settime(), errno, nanosleep(), sleep(), ticksize utility, timer_create(), timer_delete(), timer_settime()