while( my $r = $qr->dequeue ) { ++$count; if ($count == 63) { $t = time; } #### elsif (($count & 63) == 0) { if (time > $t + 5) { printf "%f\n", $count / ($N * $N * (time - $t)); last; } } } #### perl -E"$s=time(); $i=0; ++$c, rand()*rand() while time() < $s+5; say $c/5" 3210038.8