help-bash
[Top][All Lists]
Advanced

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

Re: was there a more fine number than $SECONDS for the same purpose


From: Tapani Tarvainen
Subject: Re: was there a more fine number than $SECONDS for the same purpose
Date: Sun, 7 Nov 2021 13:18:43 +0200

On Sun, Nov 07, 2021 at 09:47:15AM +0100, Alex fxmbsw7 Ratchev 
(fxmbsw7@gmail.com) wrote:

> like 0.4s or so

As far as I know there isn't. However, you could use $EPOCHSECONDS and
$EPOCHREALTIME for the purpose, e.g.,

SDIFF=$(( EPOCHSECONDS - SECONDS ))
...
MICROSECONDS=$(echo $EPOCHREALTIME - $SDIFF | bc)


-- 
Tapani Tarvainen



reply via email to

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