Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Waiting for Alarm

by traveler (Parson)
on Feb 16, 2008 at 18:49 UTC ( #668331=note: print w/ replies, xml ) Need Help??


in reply to Waiting for Alarm

You can pause a perl script waiting for an alarm with:

use POSIX qw(pause); $SIG(ALRM) = ... ... alarm $seconds; ... pause; #wait for a signal without #using CPU time


Comment on Re: Waiting for Alarm
Download Code
Replies are listed 'Best First'.
Re^2: Waiting for Alarm
by n8ur (Acolyte) on Feb 16, 2008 at 19:15 UTC
    Perfect! Thanks.

    John

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://668331]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (14)
As of 2015-07-28 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls