#include <unistd.h> unsigned int alarm( unsigned int seconds );
This call always succeeds.
If there was a previous alarm() request with time remaining,
then this routine returns the number of seconds until that outstanding
alarm would have fired. If no previous alarm() request was
outstanding, then zero is returned.
The alarm() service causes the SIGALRM signal to
be generated after the number of seconds specified by
seconds has elapsed.
Alarm requests do not queue. If alarm is called while
a previous request is outstanding, the call will result in
rescheduling the time at which the SIGALRM signal
will be generated.
If the notification signal, SIGALRM, is not caught or ignored, the
calling process is terminated.
Copyright © 1988-2004 OAR Corporation