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
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [GIT] chrony/chrony.git branch master updated. 2.4-41-g7a1ebc3
- From: Bryan Christianson <bryan@xxxxxxxxxxxxx>
- Date: Sat, 20 Aug 2016 04:04:44 +1200
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpcorp.com; s=a0-2; h=Feedback-ID:X-Smtpcorp-Track:To:Message-Id:Date: From:Subject:List-Unsubscribe:Reply-To; bh=tyIkekNMWaCE+cPyIfrC62lV6iIRvy2StRm3e4uLnHY=; b=vJvKew+mUynmYIQPSBwkYL5KDx 3yLn9aEDivSHRCLJB3qK+VpKiSfuKITV6iEKC5gC+cRJWEJxz/K0SxAHSKKHIXnb4msIzOD1bVssf TZLwNZIdLzWH/iOFN1EK/xhSxlteLVrYjckEWMSzZndbo8hN/4GLJYiyqXZQbh7WE0f9HVdH07xJA qgWdf2G09pwcE3EVHnHYggPC9MuiWlFeDvb+SlmJGJLGlssHJSLNipn8w+XdxZQpIyklRXb9WedWf lD8P+i0PE1X/Rniy1ulT1U46t70XQz2xN+hO2ywmYVX/SLLHJ7ymBKCSbGuyqkPnQ1PLVOhTLcJbu rdihsXsQ==;
- Feedback-id: 149811m:149811acx33YQ:149811sv97ly7w_6:SMTPCORP
> On 20/08/2016, at 3:38 AM, Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
>
> 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.
I think there is a faster system call so it’s probably worth investigating.
>
> 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. :)
There is something funky going on with my environment. It works fine if I run configure from the command line and chronyd/chronyc are working OK.
But when building under the IDE (Xcode), it is finding clock_gettime() somewhere and adding
#define HAVE_CLOCK_GETTIME 1
to config.h and then there is a runtime failure.
Dyld Error Message:
Symbol not found: _clock_gettime
Referenced from: /usr/local/sbin/chronyd
Expected in: /usr/lib/libSystem.B.dylib
I must be linking against a newer version of the library than is used in the runtime path.
I am running beta level Xcode/compilers/headers getting ready for the next release of macOS so it will be something to do with that. I must be picking up a changed header in the beta include tree. Interesting to see that it happens - maybe we will be able to get rid of adjtime()
I’ll keep you posted.
--
Bryan Christianson
bryan@xxxxxxxxxxxxx
--
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.