Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ts2phc: Use CLOCK_MONOTONIC_RAW for NMEA PPS timestamp.
In the calculation of the NMEA PPS timestamp is used an interval measured by the CLOCK_MONOTONIC system clock. This clock may have a large frequency error when another process (e.g. phc2sys or an NTP client) is correcting a large time error by slewing. This frequency error may cause the timestamp to overflow into the next second and cause a one-second error in the measured offset, or the wrong edge of the pulse to be rejected. Switch from CLOCK_MONOTONIC to CLOCK_MONOTONIC_RAW to avoid the impact of the system clock adjustments. Signed-off-by: Miroslav Lichvar <[email protected]>
- Loading branch information