GNU bug report logs -
#76063
[PATCH 0/3] Switch to the Shepherd's system log
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Tue, 4 Feb 2025 22:54:02 UTC
Severity: normal
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 76063 <at> debbugs.gnu.org (full text, mbox):
Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
> Not really relevant here, but that makes me recall that Guile currently
> lacks monotonic time support (time that can't move backward the
> adjusting the system clock). It could make funny log time stamps.
>
> See in srfi-19.scm:
>
> ;; -- we define it to be the same as TAI.
> ;; A different implementation of current-time-monotonic
> ;; will require rewriting all of the time-monotonic converters,
> ;; of course.
>
> (define (current-time-monotonic)
> ;; Guile monotonic and TAI times are the same.
> (let ((tai (current-time-tai)))
> (make-time time-monotonic
> (time-nanosecond tai)
> (time-second tai))))
>
>
> which as far as I can see uses CLOCK_REALTIME and not CLOCK_MONOTONIC as
> it relies on gettimeofday(2), which has this note in its documentation:
>
> The time returned by gettimeofday() is affected by discontinuous jumps
> in the system time (e.g., if the system administrator manually changes
> the system time). If you need a monotonically increasing clock, see
> clock_gettime(2).
>
> Perhaps we should open an issue in Guile to remember to tacle this
> deficiency?
Yes indeed, that’s a problem!
(Monotonic time support is available by other means like
‘get-internal-run-time’ but it would be good to fix SRFI-19.)
Ludo’.
This bug report was last modified 74 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.