Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Perl Programming/Keywords/alarm

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Perl accept and Keywords The alarm keyword alarm delivers a SIGALRM to this process after SECONDS wallclock seconds have passed. If SECONDS is omitted, contents of $_ are used. Some machines, however, may divert from the wallclock seconds by ±1 s. This call starts one and only one timer; each new call disables the previous timer like a call with 0 would also do. From Perl 5.8.0 on, the timer with a better granularity is supplied by ualarm(). Instead of using alarm, it is possible to use Perl's four-argument version of select() with the first three arguments undefined. Another way is to use syscall() to access setitimer(2)(), if supported. Beware of intermixing alarm and sleep calls, as sleep may be internally implemented on the system with alarmǃ Syntax alarm SECONDS alarm Examples alarm 4; See also syscall time Perl accept and Keywords