Don't ask to ask, just ask | |
PerlMonks |
Running code a certain amount of timeby Ninth Prince (Acolyte) |
on Oct 31, 2008 at 14:57 UTC ( [id://720710]=perlquestion: print w/replies, xml ) | Need Help?? |
Ninth Prince has asked for the wisdom of the Perl Monks concerning the following question: Hello Monks, I would like to add a condition to a while loop that exits the loop if the code has been executing for certain amount of time. For example I would like the while to exit if ($count>100 or time>60 minutes). Is there a standard way for doing this? I don't need anything fancy. I just want to be able to set the program to run for a couple of hours (if need be) and then stop. Thanks.
Back to
Seekers of Perl Wisdom
|
|