ALARM(2)

NAME
alarm - set signal timer alarm

SYNOPSIS
#include <unistd.h>

long alarm (long seconds);
long alarm10 (long tenths);

DESCRIPTION

The alarm function waits a count of seconds before asserting the terminating signal SIGALRM. When the signal has successfully been caught, alarm returns the amount of time left on the clock.

If an alarm has been set with alarm, another call to alarm will supersede the prior call. If seconds is zero, the alarm timer is disabled.

alarm10 is identical to alarm, except that values are measured in tenths of seconds.

ERRORS
No errors are possible.

STANDARDS
alarm is not quite POSIX conformant in that it uses types of long rather than unsigned int. alarm10 is a non-standard function.

SEE ALSO
setitimer(2), sigpause(2), sigvec(2), signal(2), sleep(3), ualarm(3), usleep(3)

HISTORY
An alarm function appeared in v7.