[systemd-devel] Testing if timesyncd is synced
Paul D. DeRocco
pderocco at ix.netcom.com
Wed Feb 20 17:23:38 UTC 2019
> From: Mantas Mikulenas [mailto:grawity at 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.
--
Ciao, Paul D. DeRocco
Paul mailto:pderocco at ix.netcom.com
More information about the systemd-devel
mailing list