Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

alarm on win32

by water (Deacon)
on Dec 24, 2005 at 21:22 UTC ( #518938=perlquestion: print w/replies, xml ) Need Help??
water has asked for the wisdom of the Perl Monks concerning the following question:

As win32 perl doesn't support alarm(), is there a hack or trick to get a similiar result -- throw an exception after 'n' seconds? Thanks!

water

Replies are listed 'Best First'.
Re: alarm on win32
by secret (Beadle) on Dec 24, 2005 at 21:33 UTC
    What you want may be Win32::Job's run() method :

    Provides a simple way to run the programs with a time limit. The $timeout is in seconds with millisecond accuracy. This call blocks for up to $timeout seconds, or until the processes finish

Re: alarm on win32
by Anonymous Monk on Dec 24, 2005 at 21:54 UTC
    Perl 5.8 on Win32 does support alarm()

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://518938]
Approved by idsfa
help
Chatterbox?
and monks are getting baked in the sun...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2017-11-18 01:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?