On Wed, Feb 20, 2019, 19:23 Paul D. DeRocco <pdero...@ix.netcom.com> wrote:
> > From: Mantas Mikulenas [mailto:graw...@gmail.com] > > > > Call adjtimex(2) and check whether buf.status has STA_UNSYNC > > (should be unset when clock is synchronized). > > > > The systemd-timedated helper service > > (org.freedesktop.timedate1) exposes the same flag as the > > org.freedesktop.timedate1.NTPSynchronized property on > > /org/freedesktop/timedate1. > > That looks pretty simple. I'll try it out. This is my own Yocto-based > embedded system with a recent kernel, so there are no issues of > compatibility, as others warned about. > adjtimex(2) the kernel syscall has existed since kernel 2.4.x at least, possibly even as far back as 1.0. It's older than systemd-timesyncd in any case. Others apparently were talking about /bin/adjtimex the standalone executable, which has certainly been around at least in the 2.6.x era, but being a CLI app it really makes a poor programming interface anyway. -- Mantas Mikulėnas
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel