Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Gives:#!/usr/bin/perl -w use Time::HiRes qw(clock); # version 1.90 my $start_time = clock(); $line++ while (<>); # Count number of lines in the file(s) my $end_time = clock(); my $difference = $end_time - $start_time; print ("It took ", $difference, " second\n");
Which is not refined enough to me.It took 0.02 second
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: More Detailed Timing than Time::HiRes' clock method
by liverpole (Monsignor) on Sep 26, 2006 at 12:43 UTC | |
|
Re: More Detailed Timing than Time::HiRes' clock method
by McDarren (Abbot) on Sep 26, 2006 at 12:50 UTC | |
by Anonymous Monk on Sep 27, 2006 at 01:52 UTC | |
by McDarren (Abbot) on Sep 27, 2006 at 03:10 UTC |