Commit | Line | Data |
---|---|---|
e6817382 BJ |
1 | .TH ALARM 2 |
2 | .SH NAME | |
3 | alarm \- schedule signal after specified time | |
4 | .SH SYNOPSIS | |
5 | .B alarm(seconds) | |
6 | .br | |
7 | .B unsigned seconds; | |
8 | .SH DESCRIPTION | |
9 | .I Alarm | |
10 | causes signal SIGALRM, see | |
11 | .IR signal (2), | |
12 | to be sent to the invoking process | |
13 | in a number of seconds given by the argument. | |
14 | Unless caught or ignored, the signal terminates the process. | |
15 | .PP | |
16 | Alarm requests are not stacked; | |
17 | successive calls reset the alarm clock. | |
18 | If the argument is 0, any alarm request is cancelled. | |
19 | Because the clock has a 1-second resolution, | |
20 | the signal may occur up to one second early; | |
21 | because of scheduling delays, | |
22 | resumption of execution of when the signal is | |
23 | caught may be delayed an arbitrary amount. | |
24 | The longest specifiable delay time is 2147483647 seconds. | |
25 | .PP | |
26 | The return value is the amount of time | |
27 | previously remaining in the alarm clock. | |
28 | .SH "SEE ALSO" | |
29 | pause(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) |