Definition and Usage
Sets the "alarm," causing the current process to receive a SIGALRM signal in EXPR seconds. If EXPR is omitted, the value of $_ is used instead. The actual time delay is not precise, since different systems implement the alarm functionality differently. The actual time maybe up to a second more or less than the requested value. You can only set one alarm timer at any one time. If a timer is already running and you make a new call to the alarm function, the alarm timer is reset to the new value. A running timer can be reset without setting a new timer by specifying a value of 0.
- Integer, number of seconds remaining for previous timer.
Here is the source code making use of alarm() function call.