Re: [chrony-dev] clock_gettime() support

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


I still have a system that runs chrony on Sierra (10.12), so please do
not remove adjtime().

Bryan, I think you are incorrect about a synchronization between the
addition of clock_gettime() and ntp_adjtime() in Apple OSs. Sierra
implements clock_gettime() but it DOES NOT implement ntp_adjtime().

Thanks.

On Tue, Jan 27, 2026 at 2:12 PM Bryan Christianson <bryan@xxxxxxxxxxxxxx> wrote:
>
> The macOS driver overrides clock_gettime() and falls back to gettimeofday() if the clock_gettime() symbol is not present. This override function can be easily removed.
>
> The driver also checks to see if ntp_adtime() is present and then invokes the netBSD driver if it is. I think the old code in the macOS driver that uses adjtime() should also be removed, but maybe in a separate patch. As far as I can tell, Apple implemented ntp_adjtime() around the same time frame as clock_gettime() so there will be very few instances of the old code actually being used.
>
> > On 28 Jan 2026, at 04:02, Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
> >
> > Is it ok to assume all systems supported by chrony now provide the
> > standard clock_gettime(), working at least with CLOCK_REALTIME and
> > CLOCK_MONOTONIC?
> >
> > There is a comment in the macOS driver that it's available only on
> > macOS 10.12 and later. Wikipedia says 10.11.6 was released on July 9,
> > 2018.
> >
> > I'm considering some changes in order to support synchronization of
> > Linux PHC and CLOCK_AUX clocks and it would simplify things if I could
> > just drop the gettimeofday() support and use the CLOCK_* identifiers
> > everywhere.
> >
> > --
> > 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.
> >
>
> 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.
>

--
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.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/