You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
The difference between system clock speed and PHC speed may be so huge that the linear approximation will fail to provide monotonically increasing time. For example, we run PHC time reader every ~10ms, the observed situation on dns09.28.lla1 was:
```
oldSysTimeNS=1749167822494826022 newSysTimeNS=1749167822504951677 diff=10125655ns
oldPhcTimeNS=1749167859494830869 newPhcTimeNS=1749167859504956519 diff=10125650ns
```
That means that the system time on the hosts went faster then PHC time during one of 10ms interval. Now if we will take a system time of 1749167822504951676 ( 1 ns before new system time) and try to linearly extrapolate PHC time using the diff between previous system time and the time point we chose, we will get PHC time equal to 1749167859504956523. But this value is 4 ns bigger than the next PHC value we read. That means the PHC time is not monotonic anymore. But if will apply correction coefficient of -493 PPB (ns/s), the corrected value will not be bigger then new read.
Re-arrange structure to fill in gaps and reduce the growth by only 4 bytes.
Reviewed By: t3lurid3
Differential Revision: D76096414
fbshipit-source-id: 608d79183c1c105fff99df45c8f24d8bc69fef44
0 commit comments