my $duration = 1000000; # in seconds my $wait = $duration; while ($wait >= 0) { $cmd1; $cmd2; $cmd3; $wait = $duration-time;#Decrement the time till it executed $cmd3 wi +th $duration }
In the above code, i want to execute the while loop for $duration seconds. Once it reaches $duration while should break. Sleep won't help here , neither the time . Is there a way to acheive this
In reply to timer in perl by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |