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

Re^2: Timeout on script

by Anonymous Monk
on Jul 09, 2013 at 11:39 UTC ( [id://1043302]=note: print w/replies, xml ) Need Help??


in reply to Re: Timeout on script
in thread Timeout on script

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://1043302]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-24 21:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found