On Sat, Oct 15, 2022 at 02:37:06PM -0700, todd freed wrote: > Question about the technique for converting PHC timestamps into > monotonic deadlines. > > clock_gettime(CLOCK_MONOTONIC, t1); > clock_gettime(phc, t2); > clock_gettime(CLOCK_MONOTONIC, t3); > offset = ((t3 - t1) / 2) - t2 > > Using code like this, I seem to observe a drift of about ~1 > microsecond per second. That is, the offset from the system monotonic > clock to the PHC clock grows by ~1000 nanoseconds each second. > > That is not what I would expect .. both domains have nanosecond > precision. That's quite a lot of drift to compensate for. Any ideas?
Unless you syntonize CLOCK_REALTIME with the PHC, drift is expected and normal. Thanks, Richard _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users