[EMAIL PROTECTED] wrote:
> Hello all,
> 
> I frequently see people on this list giving timing for functions or
> algorithms. Can someone point me to the point me to the module used
> for this timing? Or at least what method you used to time, I'm
> assuming it's not just a stopwatch because some of the times were far
> too precise. 
> 
> I added a new routine to a program and boot up slowed down
> significantly, and I'd like to measure how long the different steps
> take. 
> 
> Any suggestions appreciated.
> 
> -Wayne
        Depends on what you are doing.  If you want something done 50000 times 
and want to try 4 or 5 different approaches, then use Benchmark.  Comes with 
Std Perl load. 

        If you only are concerned about start and stop of either a process or 
step, then you can do something like:

        my $MyStartTime = time;

        do your work

        my $MyEndTime = $time;
        my $MyElapsedTime =$MyEndTime - $MyStartTime;

        If you need a higher level than seconds, then there is Time::HiRes ( 
again part of Std Perl ) and you can see it's examples.

        Wags ;) 


*******************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
*******************************************************


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to