use POSIX; use Benchmark; for (my $count = 0; $count <= 11; $count++) { my $bench_1 = Benchmark->new(); ... # do some intense stuff here my $bench_2 = Benchmark->new(); my $time_diff = timediff($bench_2, $bench_1); print "This interaction took: " . timestr($time_diff) . " on " . strftime("%a %b %e %H:%M:%S %Y", localtime); }
In reply to Re: Loop Timing
by BMaximus
in thread Loop Timing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |