[Chapter 3] 3.2.5 alarm
Author: Larry Wall, Tom Christiansen & Randal L. Schwartz
Date: 1999-07-02T01:47:35Z

#

| Chapter 3 Functions |

### 3.2.5 alarm

    alarm EXPR

This function sends a `SIGALRM` signal to the executing Perl program after `EXPR` seconds. On some older systems, alarms go off at the "top of the second," so, for instance, an `alarm 1` may go off anywhere between 0 to 1 second from now, depending on when in the current second it is. An `alarm 2` may go off anywhere from 1 to 2 seconds from now. And so on. For better resolution, you may be able to use syscall to call the itimer routines that some UNIX systems support. Or you can use the timeout feature of the select function.

Each call disables the previous timer, and an argument of 0 may be supplied to cancel the previous timer without starting a new one. The return value is the number of seconds remaining on the previous timer.

3.2.4 accept |  | 3.2.6 atan2