You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
276 B
Perl

use Benchmark;
$timestamp1 = new Benchmark;
for ($loop_index = 0; $loop_index < 1_000_000; $loop_index++) {
$variable1 = 1;
}
$timestamp2 = new Benchmark;
$timedifference = timediff($timestamp2, $timestamp1);
print "The loop took", timestr($timedifference);