Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ adjtime(2) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

adjtime(2)  —  Series 300/400 Only

NAME

adjtime − correct the time to synchronize the system clock
 

SYNOPSIS

#include <sys/time.h>
 
adjtime [struct timeval *delta, struct timeval *olddelta
 

DESCRIPTION

adjtime(2) adjusts the current time of the system.  The time is either advanced or retarded by the amount of time specified in the struct timeval pointed to by delta. 
 
The adjustment is done either by speeding up (for the positive delta value) or slowing down (for the negative delta value) the system’s clock by a small percentage. Thus, the time is always monotonically-increasing function. A time correction for an earlier call to adjtime may not be completed if adjtime is called again. The second call to adjtime cancels the first call. 
 
If delta is 0, then  no time correction will be done. If olddelta is not a null pointer, then the structure it points to will contain, upon return, the number of seconds and/or microseconds still to be corrected from the earlier call. if delta is a null pointer, the corresponding information will not be returned.
 
The adjustment value will be rounded to the resolution of the clock.
 

RETURN VALUE

Upon successful completion, adjtime returns a value of 0; otherwise, it returns a value -1 and sets errno to indicate an error. 
 

ERRORS

adjtime fails if one or more of the following is true:
 
EPERM   if the process does not have the appropriate privilege.
 

EXAMPLE

 

FILES

 

AUTHOR

adjtime(2) was developed by the University of California at Berkeley and HP. 
 

SEE ALSO

date(), gettimeofday(). 
 

Hewlett-Packard Company  —  HP-UX Release 9.10: April 1995

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