ntp_adjtime (3) - Linux Manuals
ntp_adjtime: tune kernel clock
Command to display ntp_adjtime
manual in Linux: $ man 3 ntp_adjtime
NAME
adjtimex, clock_adjtime, ntp_adjtime - tune kernel clock
SYNOPSIS
#include <sys/timex.h>
int adjtimex(struct timex *buf);
int clock_adjtime(clockid_t clk_id, struct timex *buf);
int ntp_adjtime(struct timex *buf);
DESCRIPTION
Linux uses David L. Mills' clock adjustment algorithm (see RFC 5905).
The system call
adjtimex()
reads and optionally sets adjustment parameters for this algorithm.
It takes a pointer to a
timex
structure, updates kernel parameters from (selected) field values,
and returns the same structure updated with the current kernel values.
This structure is declared as follows:
struct timex {
int modes; /* Mode selector */
long offset; /* Time offset; nanoseconds, if STA_NANO
status flag is set, otherwise
microseconds */
long freq; /* Frequency offset; see NOTES for units */
long maxerror; /* Maximum error (microseconds) */
long esterror; /* Estimated error (microseconds) */
int status; /* Clock command/status */
long constant; /* PLL (phase-locked loop) time constant */
long precision; /* Clock precision
(microseconds, read-only) */
long tolerance; /* Clock frequency tolerance (read-only);
see NOTES for units */
struct timeval time;
/* Current time (read-only, except for
ADJ_SETOFFSET); upon return, time.tv_usec
contains nanoseconds, if STA_NANO status
flag is set, otherwise microseconds */
long tick; /* Microseconds between clock ticks */
long ppsfreq;