my $limit = time + 3_600; my $cnt; while (1) { ++$cnt; last if $cnt > 100 || time > $limit; # rest of your loop }
Cheers - L~R
In reply to Re: Running code a certain amount of time
by Limbic~Region
in thread Running code a certain amount of time
by Ninth Prince
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |