Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Timeout on script

by eyepopslikeamosquito (Archbishop)
on Feb 03, 2004 at 06:05 UTC ( [id://326128]=note: print w/replies, xml ) Need Help??


in reply to Timeout on script

For some example code, see Timing and timing out Unix commands and Timing Windows commands.

Replies are listed 'Best First'.
Re^2: Timeout on script
by Anonymous Monk on Jul 09, 2013 at 11:39 UTC
    if you are trying to make alarm clock then you need a call back function for extra module. try to make a script that rotate the functions and check for its timeout. Again if you are trying to do something after reporting timeout.
    my $time_out = 5; my $flag = 1; while(1){ my $diff = time() - $starttime; if($diff >= $time_out){ print "already reached maximum timeout\n"; last; } if($flag){ printData(); $flag = 0; } sleep(1); } sub printData { print "i am running....\n"; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-24 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found