TOC   Previous   Next

POSIX timers

How

System Calls

Compile with cc -lrt to link against real-time library

System calls




int timer_create(clockid_t clockid, struct sigevent *evp,
      timer_t *timerid);

Creates a timer.


int timer_settime(timer_t timerid, int flags,
      const struct itimerspec *value, struct itimerspec *oldvalue);


int timer_getoverrun(timer_t timerid)

Returns timer overrun value.


int timer_gettime(timer_t timerid, struct itimerspec *value)

Retrieve current settings of a timer.



int timer_delete(timer_t timerid)

Delete a timer, allowing the associated resources to be re-used.



(C) 2006, Michael Kerrisk