I’m timing sub routines to get an idea of where my scripts spend the
most of their time. This is an example of what I’m doing:
use Time::HiRes qw( clock );
my $clock0 = clock();
... # Do something.
my $clock1 = clock();
my $clockd = $clock1 - $clock0;
I’m getting values like $clock1 = 0.030259 and $clock0 = 0.030212.
However, instead of $clockd being 0.000047, it’s returning
4.70000000000019e-05. I take it that’s exponential notation (?) but it’s
actually more difficult to read than the regular number. Is there a way to get
it to print out differently?
Thanks,
Frank
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/