Re: [chrony-users] Nanosecond precision with refclock SOCK

[ Thread Index | Date Index | More Archives ]

On Mon, Jan 15, 2024 at 06:09:53PM +0700, James Clark wrote:
> Oh, I see. So chrony is using the offset directly? I had misunderstood: I
> assumed it was computing the true time by adding the offset to the system
> time, and then using the true time. It all makes sense now.

Yes, chrony for the most part doesn't care what time it is, but rather
how much it is ahead or behind.

> the actual system time).  But the offset will be wrong by a small number of
> seconds if the system clock is so far in the past that leap seconds other
> than the latest one intervened: I don't think that matters.

That will cause an error in the initial step of the clock and it will
take longer to stabilize.

The sample time in the SOCK needs to be in the system time (UTC),
otherwise it will be rejected as invalid.

> I compute the leap flags based on the true time: if the true time occurs on
> a day that ends with a leap second, then I set the leap flags. Or should I
> be setting them if the true time is some number of hours before the end of
> the day that ends with a leap second?

The leap should be set until the leap happens, starting up to 24 hours

Miroslav Lichvar

To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.

Mail converted by MHonArc 2.6.19+