[time-nuts] seeking a time/clock software architecture
Poul-Henning Kamp
phk at phk.freebsd.dk
Fri Sep 23 15:35:29 UTC 2011
In message <4E7C9FA6.1000708 at earthlink.net>, Jim Lux writes:
>
>The standard currently defines a "time API" with some simple features to
>set and get time, nominally defined in terms of a transformation from
>some base clock (i.e. there's a default transformation of the form
>reported time = k1 * raw clock + k2). In the current standard, "time"
>is carried around as 32 bit seconds + 32 bit nanoseconds (which is, at
>least familiar to most people, being similar to POSIX seconds +
>microseconds from gettimeofday())
Take a look at FreeBSD's timecounters, what you are asking for
sounds pretty much like what I did 15 years:
http://phk.freebsd.dk/pubs/timecounter.pdf
I used a 32.64 internal format, to avoid rounding errors, particularly
in your "k1" term.
I'm headed for the US east-coast the next week, if we get anywhere
near each other, I'd be happy to talk, shoot me an email: phk at FreeBSD.org
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the Time-nuts_lists.febo.com
mailing list