Re: [Scheme-reports] current-posix-second is a disastrous mistake
Taylor R Campbell 15 Dec 2010 05:42 UTC
Date: Tue, 14 Dec 2010 23:33:10 -0500
From: John Cowan <cowan@mercury.ccil.org>
Implementations that have Posix time but no corrections will have to
return #f from current-tai-seconds at all times, making it useless.
Returning #F ever from such a procedure is useless, yes. It is as
useless as it is ridiculous.
Here are two situations:
(a) You have a TAI clock.
(b) You have a POSIX clock but no TAI clock and no leap second table.
In situation (a), you can implement SECONDS-SINCE-UTC-EPOCH correctly,
within the tolerable margin of error of the system's clock.
In situation (b), you can implement SECONDS-SINCE-UTC-EPOCH correctly,
within the tolerable margin of error of the system's clock.
What's the difference? In both situations, the tolerable margin of
error can be arbitrarily large. In situation (b), the tolerable
margin of error can't be under 1 SI second, because the POSIX clock is
designed to rewind by 1 SI second during a leap second.
Systems that implement SECONDS-SINCE-UTC-EPOCH using a POSIX clock
should document that users must be prepared to tolerate a clock in
error by more than 1 SI second.
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports