SET_TIMER(3spp)
NAME
set_timer − schedule longjmp for time in future
SYNOPSIS
#include <saio/setjmp.h>
int *_timer_jmpbuf;
_set_timer(secs)
unsigned secs;
DESCRIPTION
_set_timer arranges for a longjmp (see setjmp(3spp)) to the jmp_buf pointed to by _timer_jmpbuf to occur secs seconds in the future. If _timer_jmpbuf is zero at the time the timer expires, the timer is ignored. Timers may be cancelled by call _set_timer with an argument of 0.
Timers are implemented by the routine _scandevs, in order for timers to operate correctly _scandevs must be called periodically during the period of the timer. _scandevs is also called by the standalone i/o routines, so _scandevs need not be called if i/o is performed frequently during the period the timer is in effect.