HomeFreeBSD

pps: Round to closest integer in pps_event()

Description

pps: Round to closest integer in pps_event()

The comment above bintime2timespec() says:

When converting between timestamps on parallel timescales of differing
resolutions it is historical and scientific practice to round down.

However, the delta_nsec value is a time difference and not a timestamp. Also
the rounding errors accumulate in the frequency accumulator, see hardpps().
So, rounding to the closest integer is probably slightly better.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/604

Details

Provenance
sebastian.huber_embedded-brains.deAuthored on Feb 27 2023, 9:49 PM
impCommitted on Feb 27 2023, 10:10 PM
Parents
rG1e48d9d336c0: pps: Simplify the nsec calculation in pps_event()
Branches
Unknown
Tags
Unknown