![]() |
![]() |
![]() |
Get the amount of time left on a timer
#include <time.h> int timer_gettime( timer_t timerid, struct itimerspec *value );
libc
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 provided by the value argument. The timer is specified by timerid.
The itimerspec structure pointed to by value contains at least the following members:
POSIX 1003.1 (Realtime Extensions)
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
clock_getres(), clock_gettime(), clock_settime(), errno, nanosleep(), sleep(), timer_create(), timer_delete(), timer_settime()
![]() |
![]() |
![]() |