|TIMER_GETOVERRUN(2)||Linux Programmer's Manual||TIMER_GETOVERRUN(2)|
int timer_getoverrun(timer_t timerid);
Link with -lrt.
timer_getoverrun(): _POSIX_C_SOURCE >= 199309L
When expiration notifications are delivered via a signal, overruns can occur as follows. Regardless of whether or not a real-time signal is used for timer notifications, the system queues at most one signal per timer. (This is the behavior specified by POSIX.1. The alternative, queuing one signal for each timer expiration, could easily result in overflowing the allowed limits for queued signals on the system.) Because of system scheduling delays, or because the signal may be temporarily blocked, there can be a delay between the time when the notification signal is generated and the time when it is delivered (e.g., caught by a signal handler) or accepted (e.g., using sigwaitinfo(2)). In this interval, further timer expirations may occur. The timer overrun count is the number of additional timer expirations that occurred between the time when the signal was generated and when it was delivered or accepted.
Timer overruns can also occur when expiration notifications are delivered via invocation of a thread, since there may be an arbitrary delay between an expiration of the timer and the invocation of the notification thread, and in that delay interval, additional timer expirations may occur.
- timerid is not a valid timer ID.
POSIX.1 discusses timer overruns only in the context of timer notifications using signals.