[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
reference implementation bug
found a new bug in the SRFI 19 reference implementation (that is, the PLT
According to PLT MzScheme: Language Manual:
(current-milliseconds) returns the current ``time'' in fixnum milliseconds
(***possibly negative***). This time is based on a platform-specific
starting date or on the machine's startup time. Since the result is a
fixnum, the value increases only over a limited (though reasonably long)
If current-milliseconds is negative, this will definitely break.
Now I'm putting the following into PLT SVN:
(let* ([total-msecs (current-inexact-milliseconds)]
[secs (floor (/ total-msecs 1000))]
[msecs (floor (- total-msecs (* secs 1000)))])
(values (inexact->exact secs) (inexact->exact msecs))))
Would SRFI-19 author please check this and provide a better accompanying
implementation that works well with PLT v360?