Fri, 06 Jul 2007, by [EMAIL PROTECTED]:

>  I need a simple program which counts the elapsed time starting from
> a given point. Could you give some suggestions?

STARTTIME=$( date +%s )
<do something>
ENDTIME=$(date +%s)

ELAPSETIME=$((ENDTIME - STARTTIME))

Working out minutes and hours is left as exercise for the reader, as
usual.

Otherwise Python and Perl have easy to use modules to do these
things.

Theo
-- 
Theo v. Werkhoven    Registered Linux user# 99872 http://counter.li.org
ICBM 52 13 26N , 4 29 47E.     +      ICQ: 277217131
SUSE 10.2                      +   Jabber: [EMAIL PROTECTED]
Kernel 2.6.18                  +   See headers for PGP/GPG info.
Claimer: any email I receive will become my property. Disclaimers do not apply.
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to