ADJTIME(2) — SYSTEM CALLS
NAME
adjtime − ajdust time
SYNOPSIS
#include <sys/time.h>
adjtime(tp, otp)
struct timeval ∗tp, ∗otp;
DESCRIPTION
Adjtime adjusts the system’s notion of the current time. The time is adjusted by the amount of time in ∗tp. The old adjustment value is returned in ∗otp.
The adjustment is effected by speeding up or slowing down the system’s clock by a fixed percentage, currently 10%.
The structures pointed to by tp and otp are defined in <sys/time.h> as:
struct timeval {
u_longtv_sec;/∗ seconds since Jan. 1, 1970 ∗/
longtv_usec;/∗ and microseconds ∗/
};
If otp is a zero pointer, the corresponding information will not be returned.
Only the super-user may adjust the time of day.
The adjustment value will be silently rounded to the resolution of the system clock.
RETURN
A 0 return value indicates that the call succeeded. A −1 return value indicates an error occurred, and in this case an error code is stored into the global variable errno.
ERRORS
The following error codes may be set in errno:
[EFAULT] An argument address referenced invalid memory.
[EPERM] A user other than the super-user attempted to set the time.
SEE ALSO
Sun Release 3.0β — Last change: 20 August 1985