Elapsed time ?

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

 




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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux