bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Timing an operation


From: Matthew_S
Subject: Re: Timing an operation
Date: Fri, 25 May 2007 02:26:53 -0700 (PDT)

Thanks Paul and Chet;

They both do the same thing and that's exactly what I was looking for.

Thanks again,

Matthew.


Chet Ramey wrote:
> 
> Paul Jarc wrote:
> 
>> date1=`perl -e 'print time()'`
>> ...
>> date2=`perl -e 'print time()'`
>> interval=`expr "$date2" - "$date1"`
> 
> This general approach can be used without invoking any external programs:
> 
> date1=$SECONDS
> ...
> date2=$SECONDS
> interval=$(( $date2 - $date1 ))
> 
> Chet
> -- 
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                      Live Strong.  No day but today.
> Chet Ramey, ITS, CWRU    chet@case.edu   
> http://cnswww.cns.cwru.edu/~chet/
> 
> 
> _______________________________________________
> Bug-bash mailing list
> Bug-bash@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-bash
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Timing-an-operation-tf3809131.html#a10799786
Sent from the Gnu - Bash mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]