[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] current-posix-second is a disastrous mistake
On Tue, Dec 14, 2010 at 10:59 AM, John Cowan <cowan@x> 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@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports