ALARM(2) Linux Programmer's Manual ALARM(2)
NAME
alarm(1,2) - set(7,n,1 builtins) an alarm(1,2) clock(3,n) for delivery of a signal(2,7)
SYNOPSIS
#include <unistd.h>
unsigned int alarm(1,2)(unsigned int seconds);
DESCRIPTION
alarm(1,2) arranges for a SIGALRM signal(2,7) to be delivered to the process in(1,8)
seconds seconds.
If seconds is zero, no new alarm(1,2) is scheduled.
In any event any previously set(7,n,1 builtins) alarm(1,2) is cancelled.
RETURN VALUE
alarm(1,2) returns the number of seconds remaining until any previously
scheduled alarm(1,2) was due to be delivered, or zero if(3,n) there was no previ-
ously scheduled alarm.
NOTES
alarm(1,2) and setitimer share the same timer; calls to one will interfere
with use of the other.
sleep(1,3)() may be implemented using SIGALRM; mixing calls to alarm(1,2)() and
sleep(1,3)() is a bad idea.
Scheduling delays can, as ever, cause the execution of the process to
be delayed by an arbitrary amount of time.
CONFORMING TO
SVr4, SVID, POSIX, X/OPEN, BSD 4.3
SEE ALSO
gettimeofday(2), pause(2), select(2,7,2 select_tut)(2), setitimer(2), sigaction(2), sig-
nal(2), sleep(1,3)(3)
Linux 1993-07-21 ALARM(2)