GNU bug report logs -
#76227
SRFI 19's current-time-monotonic is not actually monotonic
Previous Next
Full log
View this message in rfc822 format
Hi,
Seen in srfi-19.scm:
--8<---------------cut here---------------start------------->8---
;; -- 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))))
--8<---------------cut here---------------end--------------->8---
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).
--
Thanks,
Maxim
This bug report was last modified 120 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.