/* * Written by Dmitry V. Levin and placed in the public domain. * * There's absolutely no warranty. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif #include #include #include #include #include #include #include int main (int argc, const char **argv) { struct timex t; memset (&t, 0, sizeof t); if (adjtimex (&t) < 0) error (EXIT_FAILURE, errno, "adjtimex"); return !(t.status & STA_UNSYNC); }