alarm

Sets an alarm.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

int  alarm(seconds)
int      seconds

Description

The alarm, when triggered, sends (raises) Ctrl-C (SIGINT) on Unix and (SIGABRT) on Win32. The function returns the number of seconds remaining from a previously set alarm for Unix and false (0) if not previously set, or true (non-zero) if previously set for Win32.
seconds specifies the number of seconds for which the alarm should be set. Zero (0) turns the alarm off.

Example

{
int seconds;
seconds = 4;
alarm(seconds);
}