~ubuntu-branches/ubuntu/saucy/manpages/saucy

« back to all changes in this revision

Viewing changes to man2/adjtime.2

  • Committer: Package Import Robot
  • Author(s): Loïc Minier
  • Date: 2011-10-17 13:06:22 UTC
  • mfrom: (1.1.46 upstream) (2.2.11 sid)
  • Revision ID: package-import@ubuntu.com-20111017130622-rbdw3julnma2baqu
Tags: 3.32-0.2ubuntu1
* Merge from Debian testing/unstable; remaining changes:
  - ptrace.2, prctl.2: document Ubuntu-specific PTRACE_ATTACH,
    PR_SET_PTRACER behavior.
* Keep Debian's glibc-doc version in the Replaces as it's satisfactory for
  upgrades from natty and lucid.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\" This is free documentation; you can redistribute it and/or
2
 
.\" modify it under the terms of the GNU General Public License as
3
 
.\" published by the Free Software Foundation; either version 2 of
4
 
.\" the License, or (at your option) any later version.
5
 
.\"
6
 
.\" The GNU General Public License's references to "object code"
7
 
.\" and "executables" are to be interpreted as the output of any
8
 
.\" document formatting or typesetting system, including
9
 
.\" intermediate and printed output.
10
 
.\"
11
 
.\" This manual is distributed in the hope that it will be useful,
12
 
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
.\" GNU General Public License for more details.
15
 
.\"
16
 
.\" You should have received a copy of the GNU General Public
17
 
.\" License along with this manual; if not, write to the Free
18
 
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
19
 
.\" USA.
20
 
.\"
21
 
.\" 2002-02-16, joey: Converted from glibc.info
22
 
.\"
23
 
.TH ADJTIME 2 2002-02-16 "Linux 2.0" "Linux Programmer's Manual"
24
 
.SH NAME
25
 
adjtime \- smoothly tune kernel clock
26
 
.SH SYNOPSIS
27
 
.B #include <sys/time.h>
28
 
.sp
29
 
.BI "int adjtime(const struct timeval *" delta ", struct timeval *" olddelta );
30
 
.SH DESCRIPTION
31
 
This function speeds up or slows down the system clock in order to
32
 
make a gradual adjustment.  This ensures that the calendar time
33
 
reported by the system clock is always monotonically increasing, which
34
 
might not happen if you simply set the clock.
35
 
 
36
 
The
37
 
.I delta
38
 
argument specifies a relative adjustment to be made to the clock time.
39
 
If negative, the system clock is slowed down fora while until it has
40
 
lost this much elapsed time.  If positive, the system clock is speeded
41
 
up for a while.
42
 
 
43
 
If the
44
 
.I olddelta
45
 
argument is not a null pointer, the
46
 
.B adjtime
47
 
function returns information about any previous time adjustment that
48
 
has not yet completed.
49
 
 
50
 
This function is typically used to synchronize the clocks of computers
51
 
in a local network.  You must be a privileged user to use it.
52
 
.SH "RETURN VALUE"
53
 
The
54
 
.B adjtime
55
 
function returns 0 on success and -1 on failure and sets the external
56
 
variable
57
 
.I errno
58
 
accordingly.
59
 
.SH ERRORS
60
 
.TP
61
 
.B EPERM
62
 
The calling process does not have enough privileges to access the clock.
63
 
.SH NOTE
64
 
With a Linux kernel, you can use the 
65
 
.BR adjtimex (2)
66
 
function to permanently change the system clock speed.
67
 
.SH "CONFORMING TO"
68
 
This function is derived from 4.3 BSD and SVr4.
69
 
.SH "SEE ALSO"
70
 
.BR adjtimex (2),
71
 
.BR settimeofday (2)