in reply to Subroutine execution time
If you need this information to profile and optimize your program, use Devel::NYTProf.
If you need this information to display statistics while your program runs (or something similar), use Time::HiRes:
use Time::HiRes qw( gettimeofday tv_interval ); my $t0 = [gettimeofday()]; ... my $elapsed = tv_interval( $tv );
|
|---|