Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ adjtime(2) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gettimeofday, settimeofday, ftime

date



ADJTIME(2,L)                AIX Technical Reference                ADJTIME(2,L)



-------------------------------------------------------------------------------
adjtime



PURPOSE

Corrects the time to allow synchronization of the system clock.

SYNTAX

#include <sys/time.h>

adjtime (delta, olddelta)
struct timeval *delta;
struct timeval *olddelta;

DESCRIPTION

The adjtime system call makes small adjustments to the system time, as returned
by gettimeofday, advancing or retarding it by the timeval delta.  If delta is
negative, the clock is slowed down by incrementing it more slowly than normal
until the correction is complete.  If delta is positive, a larger increment
than normal is used.  The skew used to perform the correction is generally a
fraction of one percent.  Thus, the time is always a monotonically increasing
function.  A time correction from an earlier call to adjtime may not be
finished when adjtime is called again.  If olddelta is nonzero, the structure
pointed to contains, upon return, the number of microseconds still to be
corrected from the earlier call.

This call may be used by time servers that synchronize the clocks of computers
in a local area network.  Such time servers would slow down the clocks of some
machines and speed up the clocks of others to bring them to the average network
time.

The call adjtime is restricted to use by the superuser.

RETURN VALUE

Upon successful completion, a value of 0 is returned.  If the adjtime system
call fails, a value of -1 is returned and errno is set to indicate the error.

ERROR CONDITIONS

The adjtime system call fails if one or more the following are true:

EFAULT  The delta or olddelta parameters point to a location outside of the
        process's allocated address space.

EPERM   The effective user ID of the calling process is not superuser.





Processed November 7, 1990       ADJTIME(2,L)                                 1





ADJTIME(2,L)                AIX Technical Reference                ADJTIME(2,L)



RELATED INFORMATION

In this book:  "gettimeofday, settimeofday, ftime."

The date command in AIX Operating System Commands Reference.

The discussion of timed and timedc in AIX TCP/IP User's Guide.
















































Processed November 7, 1990       ADJTIME(2,L)                                 2



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