TIMER_GETOVERRUN(3)

NAME
timer_getoverrun - get a POSIX timer's overrun count

SYNOPSIS
cc [ flag ... ] file -lrt [ library ... ]

#include <time.h>

int timer_getoverrun(timer_t *timer_id);

DESCRIPTION
timer_getoverrun returns the current overrun count for the timer specified by timer_id. The overrun count is the number of timer expirations not delivered to the process, since the last notification, due to an already pending signal from timer_id. Overruns may occur because a timer can only post one signal per process at a time.

The maximum overrun value is INT_MAX.

The Linux timer implementation also allows retrieving the overrun count from the si_overrun member of the siginfo structure (see siginfo.h). This is an extension to the POSIX standard that avoids the system call overhead.

RETURN VALUE
On success, timer_getoverrun returns the overrun count for the given timer_id. If the return value is 0, there were no overruns since the last notification.

On failure, timer_getoverrun returns the value -1 and errno is set appropriately.

ERRORS

EINVAL
    The timer specified by timer_id is invalid.

CONFORMING TO
POSIX 1003.1b (formerly POSIX.4) as ammended by POSIX 1003.1j-2000.

SEE ALSO
clock_getres(3), clock_gettime(3), clock_settime(3), clock_nanosleep(3), timer_create(3), timer_delete(3), timer_settime(3), timer_gettime(3)

IEEE 1003.1b-1993 (POSIX.1b standard, formerly POSIX.4), Section 14 (Clocks and Timers).