Return the number of timer overruns
#include <signal.h> #include <time.h> int timer_getoverrun( timer_t timerid );
- A timer_t object that holds a timer ID, as set by timer_create().
Use the -l c option to qcc to link against this library. This library is usually included automatically.
When a timer expiration signal is received by a process, the timer_getoverrun() function returns the timer expiration overrun count for the timer specified by timerid.
Only a single signal is queued to the process for a given timer at any point in time. When a timer that has a signal pending expires, no signal is queued and a timer overrun occurs.
- Pulses are queued for a process, so timer overruns occur only for signals.
- In order to get timer information, your process must have the PROCMGR_AID_TIMER ability enabled. For more information, see procmgr_ability().
The overrun count returned is the number of extra timer expirations that occurred between the time the expiration signal was queued and when it was delivered or accepted, up to but not including DELAYTIMER_MAX. If the number of overruns is greater than or equal to DELAYTIMER_MAX, the overrun count is set to DELAYTIMER_MAX.
The value returned by timer_getoverrun() applies to the most recent expiration signal for the specified timer. If no expiration signal has been delivered, the overrun count is 0.
The number of overruns, or -1 if an error occurs (errno is set).
- Invalid timer timerid.
- The calling process doesn't have the required permission; see procmgr_ability().
Last modified: 2013-09-30