chicken-hackers
[Top][All Lists]
Advanced

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

Re: More millisecond procedures


From: Peter Bex
Subject: Re: More millisecond procedures
Date: Sun, 3 May 2020 15:03:36 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

On Sun, May 03, 2020 at 03:48:46PM +0300, Lassi Kortela wrote:
> > Attached is a set of two patches.  The first one simply adds a
> > deprecation notice to current-milliseconds and adds the new procedure
> > current-process-milliseconds.
> 
> Racket also has `current-inexact-milliseconds`: "Returns the current time in
> milliseconds since midnight UTC, January 1, 1970. The result may contain
> fractions of a millisecond."
> <https://docs.racket-lang.org/reference/time.html>

That sounds wrong in many ways.  As you get further from 1970, you lose
more and more precision in the sub-millisecond range.

> In general, millisecond precision is probably attainable on most/all
> operating systems without too much fuss.

Yeah, and that's why we came to the conclusion that in CHICKEN core,
it's probably enough to just change the name of current-milliseconds
to reduce confusion and call it a day.

> It's the sub-millisecond range where the problems begin.
> 
> Would it make sense to write a really simple SRFI about these
> millisecond-precision procedures?

I think SRFI-174 should suffice.  Also, I don't have the energy to
follow all the new SRFIs being pumped out as part of R7RS anyway.

Cheers,
Peter

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]