in reply to Finding Time Difference of Localtime

hmm, it seems you like to do a Benchmark, but if i'm wrong, try Time::HiRes

  • Comment on Re: Finding Time Difference of Localtime

Replies are listed 'Best First'.
Re^2: Finding Time Difference of Localtime
by RaduH (Scribe) on Oct 25, 2007 at 15:20 UTC
    That's exactly what I did just recently:
    use Time::HiRes; ... my $start = Time::HiRes::time(); ... do your job ... my $stop = Time::HiRes::time(); my $duration = $stop-$start;
    It gives you the difference with a lot more precision that whole seconds, but if that's what you care about it should eb easy to round the number.