alarm
Purpose
Sets a process's alarm clock.
Syntax
unsigned int alarm (sec)
unsigned int sec;
Description
The alarm system call instructs the calling process's
alarm clock to send a SIGALRM signal to the calling
process after the number of real-time seconds specified
by the sec parameter have elapsed. (See "signal" for
more information about signals.)
The alarm system calls are not stacked. Successive alarm
system calls reset the calling process's alarm clock.
If the sec parameter is 0, any previous alarm request is
canceled.
Return Value
The alarm system call returns the amount of time previ-
ously remaining in the calling process's alarm clock. If
no alarm request was previously issued, then a value of 0
is returned.
Related Information
In this book: "pause" and "signal."