Adjusts the kernel time parameters. Linux uses David L. Mills' clock adjustment algorithm (see RFC 1305). The sys_adjtimex reads and optionally sets adjustment parameters for this algorithm.
Arguments
eax |
124 |
ebx |
Pointer to a properly initialized timex structure:
struc timex
{
.modes rd 1 ; mode selector
.offset rd 1 ; time offset (usec)
.freq rd 1 ; frequency offset (scaled ppm)
.maxerror rd 1 ; maximum error (usec)
.esterror rd 1 ; estimated error (usec)
.status rd 1 ; clock command/status
.constant rd 1 ; pll time constant
.precision rd 1 ; clock precision (usec) (read only)
.tolerance rd 1 ; clock frequency tolerance (ppm) (read only)
.time timeval ; (read only)
.tick rd 1 ; (modified) usecs between clock ticks
.ppsfreq rd 1 ; pps frequency (scaled ppm) (ro)
.jitter rd 1 ; pps jitter (us) (ro)
.shift rd 1 ; interval duration (s) (shift) (ro)
.stabil rd 1 ; pps stability (scaled ppm) (ro)
.jitcnt rd 1 ; jitter limit exceeded (ro)
.calcnt rd 1 ; calibration intervals (ro)
.errcnt rd 1 ; calibration errors (ro)
.stbcnt rd 1 ; stability limit exceeded (ro)
rd 12
} |
times members:
modes
Determines which parameters to set. It may contain one or a bitwise-or operation of the following values:
ADJ_OFFSET - time offset
ADJ_FREQUENCY - frequency offset
ADJ_MAXERROR - maximum time error
ADJ_ESTERROR - estimated time error
ADJ_STATUS - clock status
ADJ_TIMECONST - pll time constant
ADJ_TICK - tick value
ADJ_OFFSET_SINGLESHOT - old-fashioned adjtime
|
Return values
If the system call succeeds the return value is clock state:
TIME_OK - clock synchronized
TIME_INS - insert leap second
TIME_DEL - delete leap second
TIME_OOP - leap second in progress
TIME_WAIT - leap second has occurred
TIME_BAD - clock not synchronized |
If the system call fails the return value is one of the following errno values:
-EFAULT |
ebx doesn't points to writiable memory block. |
-EINVAL |
An attempt is made to set buf.offset to a value outside the range -131071 to +131071, or to set buf.status to a value other than those listed above, or to set buf.tick to a value outside the range 900000/Hz to 1100000/Hz, where Hz is the system timer interrupt frequency. |
-EPERM |
buf.mode is non-zero and the caller does not have sufficient privilege. Under Linux the CAP_SYS_TIME capability is required. |
|
Remarks
Only a superuser may set any parameters. Ordinary users are restricted to a zero value for mode selector.
Compatibility
n/a
|