bug-bash
[Top][All Lists]
Advanced

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

Re: Potentially misleading documentation of SECONDS variable


From: bash
Subject: Re: Potentially misleading documentation of SECONDS variable
Date: Tue, 6 Aug 2024 22:55:49 +0200

On Tue, Aug 06, 2024 at 03:58:35PM -0400, Chet Ramey wrote:
> [...] Bash has never looked at
> anything but whole seconds. [...]
> 
Ok, cool. So this is not a bug but rather just how Bash works. That's
fine but then I think the documentation could reflect the actual
behaviour better. I found this "edge case" (where it seemed as if Bash
sometimes failed at calculating the correct value) a bit confusing.
Maybe I was using Bash in a "non-standard" way, not as it was supposed
to... But still, I think the behaviour could be more intuitive. From
reading the manual I expected a different behaviour but since I have
not coded anything on Bash myself I know I have no right to anything
else than an opinion :)

> If you're interested in that kind of sub-second precision, use
> EPOCHREALTIME. If you want something that's not affected by assignment,
> use EPOCHSECONDS.
> 
I am not. I have since this "discovery" learnt to use lower case
variable names which solves all and every issue I had before. Opening
this issue was merely an attempt to raise the question on if and how
Bash could be improved.



reply via email to

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