System clock always unsynced

Ian Lepore ian at freebsd.org
Mon Apr 27 23:24:09 UTC 2015


On Mon, 2015-04-27 at 16:30 +0000, Christian Weisgerber wrote:
> On 2015-04-27, Christian Weisgerber <naddy at mips.inka.de> wrote:
> 
> > What *does* an ntpd daemon need to do to sync the clock?
> 
> Okay, let me rephrase this since the first two replies completely
> missed the point.  This is an API programming question.  How is the
> poorly documented ntp_adjtime() API to be used so the system clock
> will lose the STA_UNSYNC status and switch from TIME_ERROR to TIME_OK
> as clock state?
> 

It requires a call to ntp_adjtime() with the MOD_STATUS bit set in
ntv.modes and the STA_UNSYNC bit clear in ntv.status.

-- Ian



More information about the freebsd-hackers mailing list