I have implemented refclock SOCK for a project I'm working on. In my case,
I am getting samples from a PHC, so I have a system time with nanosecond
precision (from PTP_SYS_OFFSET*). But refclock SOCK uses struct timeval,
which is in microseconds. I looked at the refclock_sock servo in linuxptp
4.x, and that just discards away the fraction of the microsecond.  But
that's not very satisfying and makes chronyc give misleading information
about the accuracy of the offset.

I'm wondering if I can just adjust the offset by the fraction of the
microsecond. But I think there will be edge cases around leap seconds, and,
if that's the right thing to do, why doesn't the refclock_sock servo do it?

James

Reply via email to