Re: [LEAPSECS] how to reset a clock

From: Tony Finch <dot_at_dotat.at>
Date: Thu, 4 Jan 2007 10:28:04 +0000

On Thu, 4 Jan 2007, Zefram wrote:
>
> Interval clock and real-time clock remain conceptually distinct. If you
> have a single clock counter alongside a variable epoch, the sum of the
> two is the effective real-time clock. I don't think you're gaining
> anything by not reifying it.

I'm gaining simplicity. A count of seconds (perhaps fractional) is much
simpler than a broken-down time. It's much simpler to keep a simple
interval representation separate from leap second and time zone handling.

Your points about recording adjustments across reboots are useful, thanks.

> The solution is to just let the clock run, never adjust it, and treat
> it as an independent seconds count. You don't care about it showing
> the wrong time, because you don't treat its output as an absolute time.
> Instead, collect your data on how far out it is (or rather, what absolute
> time -> output function it is computing) and add the epoch in software.
> Any number of users of the same clock can do this without treading on
> each other's toes.

I think that's what I was suggesting :-)

Tony.
--
f.a.n.finch  <dot_at_dotat.at>  http://dotat.at/
THAMES DOVER WIGHT PORTLAND PLYMOUTH: WEST 6 TO GALE 8, OCCASIONALLY SEVERE
GALE 9 AT FIRST IN THAMES AND DOVER, DECREASING 4 OR 5 LATER. ROUGH,
OCCASIONALLY MODERATE LATER. SHOWERS DYING OUT. GOOD.
Received on Thu Jan 04 2007 - 02:38:48 PST

This archive was generated by hypermail 2.3.0 : Sat Sep 04 2010 - 09:44:55 PDT