ALARM(S) XENIX System V ALARM(S)
Name
alarm - Sets a process' alarm clock.
Syntax
unsigned alarm (sec)
unsigned sec;
Description
alarm sets the calling process' alarm clock to sec seconds.
After sec ``real-time'' seconds have elasped, the alarm
clock sends a SIGALRM signal to the process; see signal(S).
Although alarm does not wait for the signal after setting
the alarm clock, pause(S) may be used to make the calling
process wait.
Alarm requests are not stacked; successive calls reset the
calling process' alarm clock.
If sec is 0, any previously made alarm request is canceled.
fork(S) sets the alarm clock of a new process to 0. a
process created by exec(S) inherits the time left on the old
process's alarm clock.
Return Value
alarm returns the amount of time previously remaining in the
calling process' alarm clock.
See Also
pause(S), signal(S)
Page 1 (printed 8/7/87)