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

Re: reference implementation bug


SRFI-19 is currently unsupported, and will likely remain so.

If anyone would like to 'take over support,' please contact me.

Will Fitzgerald will dot fitzgerald at pobox dot com.

On 3/12/07, Chongkai Zhu <czhu@xxxxxxxxxxx> wrote:

According to
http://list.cs.brown.edu/pipermail/plt-scheme/2007-March/016761.html and
http://list.cs.brown.edu/pipermail/plt-scheme/2007-March/016763.html, we
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:

(define (tm:get-time-of-day)
   (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?


Will Fitzgerald
weblog: <http://www.entish.org/willwhim>