ALARM

Section: MINTLIB LIBRARY FUNCTIONS (3)
Updated: 3 March 1993
Index Return to Main Contents
 

NAME

alarm - set a process alarm clock  

SYNOPSIS

#include <unistd.h>

unsigned alarm(unsigned sec);
 

DESCRIPTION

alarm instructs the alarm clock of the calling process to send the signal SIGALRM to the calling process after the number of real time seconds specified by sec have elapsed. When 32-bit integers are used, the largest value that is allowed for sec is (2^31 - 1) / 1000; larger values are silently rounded down. Thus, the longest alarm takes about 3 weeks to deliver. Alarm requests are not stacked; successive calls reset the alarm clock of the calling process. If sec is 0, any previously made alarm request is cancelled.  

SEE ALSO

pause(3), signal(3), sigpause(3), sigset(3), Talarm(2)  

RETURN VALUES

alarm returns the amount of time previously remaining in the alarm clock of the calling process, or 0 if no alarm was scheduled.  

NOTE

This call only works when MiNT is active; under TOS, zero is always returned.
 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
RETURN VALUES
NOTE

This document was created by man2html, using the manual pages.
Time: 11:15:10 GMT, June 22, 2025