Method alarm()
- Method
alarm
int
alarm(int
seconds
)- Description
Set an alarm clock for delivery of a signal.
alarm() arranges for a SIGALRM signal to be delivered to the process in
seconds
seconds.If
seconds
is0
(zero), no new alarm will be scheduled.Any previous alarms will in any case be canceled.
- Returns
Returns the number of seconds remaining until any previously scheduled alarm was due to be delivered, or zero if there was no previously scheduled alarm.
- Note
This function is only available on platforms that support signals.
- See also