On 3/24/23 6:19 PM, William Kennington wrote:
Not worried, it is legitimately a problem for us to the point we are
currently patching bash to use the monotonic clock for seconds. It times
out stuff in our boot process which executes normally after the time sync
has completed and jumped the clock forward. Rght now, we are just patching
bash until we can fix all of our uses of $SECONDS. I don't really have a
preference for how this gets exposed (updating SECONDS to use the monotonic
timer, adding a new variable like MONOSECONDS, or some other call to get
monotonic time via clock_gettime).
Interesting. I was wondering how you got onto this, so I looked around for
any utilities (e.g., timeout, sleep), library functions, or system calls
that use the monotonic clock and couldn't find any. It must be too `new';
everyone seems to use the realtime clock.
I'll take it as a feature request.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/