Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ntp_adjtime(2) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xntpd(1M)

ntp_gettime(2)

ntp_adjtime(2)

NAME

ntp_adjtime − adjust local clock parameters

SYNOPSIS

#include <sys/timex.h>
int ntp_adjtime(struct timex ∗tptr )

DESCRIPTION

ntp_adjtime adjusts the parameters used to discipline the local clock, according to the values in the struct timex pointed to by tptr.  Before returning, it fills in the structure with the most recent values kept in the kernel. 

The adjustment is effected in part by speeding up or slowing down the clock, as necessary, and in part by phase-locking onto a once-per second pulse (PPS) provided by a driver, if available. 
 

struct timex {
uint32_t modes;/∗ clock mode bits (w) ∗/
int32_t offset;/∗ time offset (us) (rw) ∗/
int32_t freq;/∗ frequency offset (scaled ppm) (rw) ∗/
int32_t maxerror;/∗ maximum error (us) (rw) ∗/
int32_t esterror;/∗ estimated error (us) (rw) ∗/
int32_t status;/∗ clock status bits (rw) ∗/
int32_t constant;/∗ pll time constant (rw) ∗/
int32_t precision;/∗ clock precision (us) (r) ∗/
int32_t tolerance;/∗ clock frequency tolerance (scaled ppm) (r) ∗/
int32_t ppsfreq;/∗ pps frequency (scaled ppm) (r) ∗/
int32_t jitter;/∗ pps jitter (us) (r) ∗/
int32_t shift;/∗ interval duration (s) (shift) (r) ∗/
int32_t stabil;/∗ pps stability (scaled ppm) (r) ∗/
int32_t jitcnt;/∗ jitter limit exceeded (r) ∗/
int32_t calcnt;/∗ calibration intervals (r) ∗/
int32_t errcnt;/∗ calibration errors (r) ∗/
int32_t stbcnt;/∗ stability limit exceeded (r) ∗/
};

RETURN VALUES

ntp_adjtime returns:

The current clock state On success

TIME_ERROR On failure

It sets errno to one of the following:

EFAULT if tptr is an invalid pointer

EPERM if the user is not root

SEE ALSO

xntpd(1M), ntp_gettime(2)

SunOS 5.6  —  Last change: 28 Jan 1997

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026