BSD 3 development
[unix-history] / usr / man / man2 / alarm.2
CommitLineData
e6817382
BJ
1.TH ALARM 2
2.SH NAME
3alarm \- schedule signal after specified time
4.SH SYNOPSIS
5.B alarm(seconds)
6.br
7.B unsigned seconds;
8.SH DESCRIPTION
9.I Alarm
10causes signal SIGALRM, see
11.IR signal (2),
12to be sent to the invoking process
13in a number of seconds given by the argument.
14Unless caught or ignored, the signal terminates the process.
15.PP
16Alarm requests are not stacked;
17successive calls reset the alarm clock.
18If the argument is 0, any alarm request is cancelled.
19Because the clock has a 1-second resolution,
20the signal may occur up to one second early;
21because of scheduling delays,
22resumption of execution of when the signal is
23caught may be delayed an arbitrary amount.
24The longest specifiable delay time is 2147483647 seconds.
25.PP
26The return value is the amount of time
27previously remaining in the alarm clock.
28.SH "SEE ALSO"
29pause(2), signal(2), sleep(3)
30.SH "ASSEMBLER (PDP-11)"
31(alarm = 27.)
32.br
33(seconds in r0)
34.br
35.B sys alarm
36.br
37(previous amount in r0)