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

Elapsed time ?




I'm trying to get the elapsed time. The following gives me '1', however I would like it to give me 1.98333333. Where am I missing the boat?


#!/bin/sh

TIME1=`date +%s`
echo $TIME1
sleep 119
TIME2=`date +%s`
echo $TIME2


ELTIME=$[ ($TIME2 - $TIME1)/60 ]
echo $ELTIME

--

 Programs: What software used to be, back when we knew how to write it.
  02:30:02 up 7 days,  6:13,  7 users,  load average: 1.31, 1.20, 1.03

 Linux Registered User #241685  http://counter.li.org


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