#include <time.h>
#include <string.h>
+#include <sys/timex.h>
#include "util.h"
#include "time-util.h"
return 0;
}
+
+bool ntp_synced(void) {
+ struct timex txc = {};
+
+ if (adjtimex(&txc) < 0)
+ return false;
+
+ if (txc.status & STA_UNSYNC)
+ return false;
+
+ return true;
+}