> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 28, 2004 11:51 AM
> To: [EMAIL PROTECTED]
> Subject: How to calculate elapsed time ?
> 
> 
> Hi all:
> 
> I'm trying to determine how long an system operation takes.  
> Anyone know 
> of a simple way to do this ?
> 
> I wanted to establish the start time.  Then run the 
> operation.  Then mark 
> the finish time.   Then substract the start time from the 
> finish time to 
> get an elapsed time.  Here's the simplistic approach I tried. 
>  I'm sure I 
> need a time that is measured in seconds or something like 
> that, but I'm 
> not sure how to do this.
> 
> TIA
> 
[code snipped]
> 

    use Time::Elapse;

    # somewhere in your program...
    Time::Elapse->lapse(my $now); 
   
    #...rest of program execution

    print "Time Wasted: $now\n";


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to