Annotation of 43BSDReno/lib/libc/sys/adjtime.2, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1980 Regents of the University of California.
                      2: .\" All rights reserved.
                      3: .\"
                      4: .\" Redistribution and use in source and binary forms are permitted provided
                      5: .\" that: (1) source distributions retain this entire copyright notice and
                      6: .\" comment, and (2) distributions including binaries display the following
                      7: .\" acknowledgement:  ``This product includes software developed by the
                      8: .\" University of California, Berkeley and its contributors'' in the
                      9: .\" documentation or other materials provided with the distribution and in
                     10: .\" all advertising materials mentioning features or use of this software.
                     11: .\" Neither the name of the University nor the names of its contributors may
                     12: .\" be used to endorse or promote products derived from this software without
                     13: .\" specific prior written permission.
                     14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
                     15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
                     16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     17: .\"
                     18: .\"    @(#)adjtime.2   1.6 (Berkeley) 6/23/90
                     19: .\"
                     20: .TH ADJTIME 2 "June 23, 1990"
                     21: .UC 6
                     22: .SH NAME
                     23: adjtime \- correct the time to allow synchronization of the system clock
                     24: .SH SYNOPSIS
                     25: .nf
                     26: .ft B
                     27: #include <sys/time.h>
                     28: .PP
                     29: .ft B
                     30: adjtime(delta, olddelta)
                     31: struct timeval *delta; 
                     32: struct timeval *olddelta;
                     33: .fi
                     34: .SH DESCRIPTION
                     35: .I Adjtime
                     36: makes small adjustments to the system time, as returned by
                     37: .IR gettimeofday (2),
                     38: advancing or retarding it
                     39: by the time specified by the timeval
                     40: \fIdelta\fP.
                     41: If \fIdelta\fP is negative, the clock is
                     42: slowed down by incrementing it more slowly than normal until
                     43: the correction is complete.
                     44: If \fIdelta\fP is positive, a larger increment than normal
                     45: is used.
                     46: The skew used to perform the correction is generally a fraction of one percent.
                     47: Thus, the time is always
                     48: a monotonically increasing function.
                     49: A time correction from an earlier call to \fIadjtime\fP
                     50: may not be finished when \fIadjtime\fP is called again.
                     51: If \fIolddelta\fP is non-zero,
                     52: then the structure pointed to will contain, upon return, the
                     53: number of microseconds still to be corrected
                     54: from the earlier call.
                     55: .PP
                     56: This call may be used by time servers that synchronize the clocks
                     57: of computers in a local area network.
                     58: Such time servers would slow down the clocks of some machines
                     59: and speed up the clocks of others to bring them to the average network time.
                     60: .PP
                     61: The call 
                     62: .IR adjtime (2)
                     63: is restricted to the super-user.
                     64: .SH "RETURN VALUE
                     65: A return value of 0 indicates that the call succeeded.
                     66: A return value of \-1 indicates that an error occurred, and in this
                     67: case an error code is stored in the global variable \fIerrno\fP.
                     68: .SH "ERRORS
                     69: The following error codes may be set in \fIerrno\fP:
                     70: .TP 15
                     71: [EFAULT]
                     72: An argument points outside the process's allocated address space.
                     73: .TP 15
                     74: [EPERM]
                     75: The process's effective user ID is not that of the super-user.
                     76: .SH "SEE ALSO"
                     77: date(1), gettimeofday(2), timed(8), timedc(8),
                     78: .br
                     79: \fITSP: The Time Synchronization Protocol for UNIX 4.3BSD\fP, 
                     80: R. Gusella and S. Zatti

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.