4.4BSD/usr/src/share/man/man3f/alarm.3

Compare this file to the similar file:
Show the results in this format:

.\" Copyright (c) 1983, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" This module is believed to contain source code proprietary to AT&T.
.\" Use and redistribution is subject to the Berkeley Software License
.\" Agreement and your Software Agreement with AT&T (Western Electric).
.\"
.\"	@(#)alarm.3	8.1 (Berkeley) 6/5/93
.\"
.TH ALARM 3F "June 5, 1993"
.UC 5
.SH NAME
alarm \- execute a subroutine after a specified time
.SH SYNOPSIS
.B integer function alarm (time, proc)
.br
.B integer time
.br
.B external proc
.SH DESCRIPTION
This routine arranges for subroutine
.I proc
to be called after
.I time
seconds. If
.I time
is ``0'', the alarm is turned off and no routine will be called.
The returned value will be the time remaining on the last alarm.
.SH FILES
.ie \nM /usr/ucb/lib/libU77.a
.el /usr/lib/libU77.a
.SH "SEE ALSO"
alarm(3C), sleep(3F), signal(3F)
.SH BUGS
.I Alarm
and
.I sleep
interact. If
.I sleep
is called after
.IR alarm ,
the
.I alarm
process will never be called. SIGALRM will occur at the lesser of the
remaining
.I alarm
time or the
.I sleep
time.