++ed by:
JGAMBLE RPAVLOV

2 PAUSE users
1 non-PAUSE user.

Christian Jaeger
and 1 contributors

NAME

Chj::time_this - benchmarking function that also returns the result(s)

SYNOPSIS

 use Chj::tim;
 my $res= time_this { somefunc(66) }; # prints timing to stderr
 # or
 my $res= time_this { somefunc(66) } "somefunc"; # included in message
 # or
 my $res= time_this { somefunc(66) }
              msg=> "somefunc", n=> 10; # run thunk 10 times
 # or
 my $res= time_this { somefunc(66) } out=> \@t; # push to @t instead of stderr

DESCRIPTION

Currently does not divide the timings by the number of iterations.

Currently does not subtract the overhead of calling the thunk (as Benchmark.pm does, but can't use it since it doesn't return values; should we wrap and use assignment instead? But then timings are off again.)

Also should probably follow the output format of Benchmark.pm

SEE ALSO

 L<Benchmark>