Re: [chrony-dev] [GIT] chrony/chrony.git branch master updated. 2.4-41-g7a1ebc3 |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
On Sat, Aug 20, 2016 at 02:32:33AM +1200, Bryan Christianson wrote:
> > local: add support for clock_gettime()
> >
> > Use clock_gettime() to read the system clock in nanosecond resolution.
>
> Is there any benefit in doing a version of clock_gettime() for macOS ?
> There are system calls that will return nanosec resolution, but we are still stuck with adjtime() for adjustment.
I think only if it's a faster system call then gettimeofday(). As for
resolution, it would change only the transmit timestamp (which is not
very accurate anyway as the kernel/NIC typically delays the packet for
at least few tens of microseconds) and the receive timestamp
(SO_TIMESTAMP) would still be in microseconds.
The point of this painful conversion of the code to timespec was to
get ready for HW timestamping. The refclock drivers always calculated
offsets in floating point or integer nanoseconds, so this is only
about NTP.
So, does the new code build and work for you? I was a bit worried I'd
break it on macOS. :)
--
Miroslav Lichvar
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.