$start = time;
at the end of the loop
last if time > $start + $duration;
(untested)
OR
while ( time < $start + $duration)
instead of an endless loop.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery
In reply to Re: timer in perl
by LanX
in thread timer in perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |