ntp_gettime(3) Library Functions Manual ntp_gettime(3) ntp_gettime, ntp_gettimex - ( NTP) C (libc, -lc) #include int ntp_gettime(struct ntptimeval *ntv); int ntp_gettimex(struct ntptimeval *ntv); ntv, : struct ntptimeval { struct timeval time; /* Current time */ long maxerror; /* Maximum error */ long esterror; /* Estimated error */ long tai; /* TAI offset */ /* Further padding bytes allowing for future expansion */ }; : time , timeval: struct timeval { time_t tv_sec; /* - , */ suseconds_t tv_usec; /* - */ }; maxerror , . ntp_adjtime(3), ( Linux ), ( NTP_PHASE_MAX, 16000). esterror , . ntp_adjtime(3) . . tai TAI (Atomic International Time, ). ntp_gettime() ntptimeval time, maxerror esterror. ntp_gettimex() ntp_gettime() tai. ntp_gettime() ntp_gettimex() adjtimex(2). . attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |ntp_gettime(), | | MT-Safe | |ntp_gettimex() | | | +----------------------------+----------------------------------------------------------+--------------------------+ ntp_gettime() NTP Kernel Application Program Interface. ntp_gettimex() GNU. ntp_gettime() glibc 2.1. ntp_gettimex() glibc 2.12. adjtimex(2), ntp_adjtime(3), time(7) NTP "Kernel Application Program Interface" () Alex Nik , Azamat Hackimov , Dmitry Bolkhovskikh , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.9.1 2 2024 . ntp_gettime(3)