in reply to Re: Timing Your Program
in thread Timing Your Program

use Benchmark; my $t0 = new Benchmark; # See code run my $t1 = new Benchmark; my $td = timediff($t1, $t0); print timestr($td) . "\n";
Use as many or as few of those Benchmark objects as you'd like at any point in the program. The CPAN docs on Benchmark are great, but I thought it may be helpful to see the code right here. Instant gratification is key. :)

Replies are listed 'Best First'.
Re: Sample code for Benchmark
by cybear (Monk) on May 24, 2002 at 16:26 UTC
    what module does Benchmark come from?
      Benchmark -- It's its own module -- in the standard Perl distrib.