xref: /original-bsd/share/man/man3f/alarm.3 (revision 431be598)
Copyright (c) 1983, 1993
The Regents of the University of California. All rights reserved.

%sccs.include.proprietary.roff%

@(#)alarm.3 8.1 (Berkeley) 06/05/93

ALARM 3F ""
C 5
NAME
alarm - execute a subroutine after a specified time
SYNOPSIS
integer function alarm (time, proc)

integer time

external proc

DESCRIPTION
This routine arranges for subroutine proc to be called after time seconds. If 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.
FILES
"SEE ALSO"
alarm(3C), sleep(3F), signal(3F)
BUGS
Alarm and sleep interact. If sleep is called after alarm , the alarm process will never be called. SIGALRM will occur at the lesser of the remaining alarm time or the sleep time.