in reply to Time down to the milisecond, without a system command?
You want to use Time::HiRes.
(I altered one of the examples from the Time::HiRes docs...)
#!/usr/bin/perl use warnings; use strict; use Time::HiRes qw( gettimeofday tv_interval ); # measure elapsed time my $t0 = [gettimeofday]; # do bunch of stuff here my $t1 = [gettimeofday]; # do more stuff here my $t0_t1 = tv_interval $t0, $t1; my $elapsed = tv_interval ($t0, [gettimeofday]);
|
|---|