Re: [Scheme-reports] current-posix-second is a disastrous mistake
Alex Shinn 15 Dec 2010 04:08 UTC
On Tue, Dec 14, 2010 at 10:59 AM, John Cowan <cowan@mercury.ccil.org> wrote:
>
> I have added a second return value to TimeCowan's current-posix-seconds
> which is 0 if this is definitely not a leap second, 1 if it is definitely
> a leap second, and #f if the implementation doesn't know. Does that
> make you sufficiently happy?
No, it makes me profoundly unhappy, but at least it's
a viable solution.
I think providing `current-tai-seconds' is all around a much
simpler solution. Then we can have
(define (tai->posix-seconds tai-secs)
(- tai-secs (binary-search-range vector-of-leap-seconds))
where the first element of vector-of-leap-seconds is -inf.0.
--
Alex
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports