manual page distributed with 4.2BSD
[unix-history] / usr / src / share / man / man3f / alarm.3
CommitLineData
97eb2f19
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
3db7620f 5.\" @(#)alarm.3 6.1 (Berkeley) %G%
97eb2f19 6.\"
3db7620f 7.TH ALARM 3F ""
97eb2f19
KM
8.UC 5
9.SH NAME
10alarm \- execute a subroutine after a specified time
11.SH SYNOPSIS
12.B integer function alarm (time, proc)
13.br
14.B integer time
15.br
16.B external proc
17.SH DESCRIPTION
18This routine arranges for subroutine
19.I proc
20to be called after
21.I time
22seconds. If
23.I time
24is ``0'', the alarm is turned off and no routine will be called.
25The returned value will be the time remaining on the last alarm.
26.SH FILES
27.ie \nM /usr/ucb/lib/libU77.a
28.el /usr/lib/libU77.a
29.SH "SEE ALSO"
30alarm(3C), sleep(3F), signal(3F)
31.SH BUGS
32.I Alarm
33and
34.I sleep
35interact. If
36.I sleep
37is called after
38.IR alarm ,
39the
40.I alarm
41process will never be called. SIGALRM will occur at the lesser of the
42remaining
43.I alarm
44time or the
45.I sleep
46time.