ALARM(2) — Silicon Graphics
NAME
alarm − set a process’s alarm clock
SYNOPSIS
unsigned alarm (sec)
unsigned sec;
DESCRIPTION
Alarm instructs the calling process’s alarm clock to send the signal SIGALRM to the calling process after the number of real time seconds specified by sec have elapsed; see signal(2).
Alarm requests are not stacked; successive calls reset the calling process’s alarm clock. If the argument is 0, any alarm request is canceled. Because the clock has a 1-second resolution, the signal may occur up to one second early; because of scheduling delays, resumption of execution of when the signal is caught may be delayed an arbitrary amount. The longest specifiable delay time is 4,294,967,295 (2**32-1) seconds, or 136 years.
If sec is 0, any previously made alarm request is canceled.
RETURN VALUE
Alarm returns the amount of time previously remaining in the calling process’s alarm clock.
SEE ALSO
ASSEMBLER
moveq#27,D0
movlsec,A0
trap#0
On return, D0 will contain the amount of time previously remaining in the alarm clock.
Version 2.5 — April 22, 1987