2.9BSD/usr/man/cat3/alarm.3f


ALARM(3F)           UNIX Programmer's Manual            ALARM(3F)

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 _p_r_o_c to be called after
     _t_i_m_e seconds. If _t_i_m_e 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
     /usr/lib/libU77.a

SEE ALSO
     alarm(2), sleep(3f), signal(3f)

BUGS
     _A_l_a_r_m and _s_l_e_e_p interact. If _s_l_e_e_p is called after _a_l_a_r_m,
     the _a_l_a_r_m process will never be called. SIGALRM will occur
     at the lesser of the remaining _a_l_a_r_m time or the _s_l_e_e_p time.

Printed 7/31/83                                                 1