Time Libraries Rough Draft
Ashley Yakeley
ashley at semantic.org
Sat Feb 12 20:14:44 EST 2005
In article <20050212150528.GH4062 at momenergy.repetae.net>,
John Meacham <john at repetae.net> wrote:
> which will do its best to get the current TAI time (subject to system
> interfaces). which may be just converting from POSIX time with the most
> up-to-date leap second table, but very well might do something better on
> some systems.
Doing this sort of "whatever's best" has problems. We have to provide a
single library that people will compile in to their programs, and a
single binary may run on systems with different resources available.
I'd rather give users the tools they need to get the table or to get TAI
in explicit ways, rather than doing a bunch of unknown stuff such as
file access behind the scenes. This way people can come up with their
own strategies for the kind of reliability they need. Something like
this, perhaps:
parseLeapSecondTableFromUSNO :: ReadS LeapSecondTable
parseLeapSecondTableFromLibTAI :: ReadS LeapSecondTable
getLeapSecondTableFromLibTAI :: FilePath -> IO LeapSecondTable
--
Ashley Yakeley, Seattle WA
More information about the Libraries
mailing list