in reply to Timing a process

My favorite tool for this is Benchmark::Timer.

use Benchmark::Timer; my $T = new Benchmark::Timer; $T->start( 'Outer' ); for( 1 .. 1000 ) { $T->start( 'Inner' ); # Request a 50 millisec delay to simulate command select undef, undef, undef, 0.05; $T->stop( 'Inner' ) }; $T->stop( 'Outer' ); $T->report; 1 trial of Outer (199.094s total) 1000 trials of Inner (62.500s total), 62.500ms/trial

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Timing (and a little luck) are everything!