1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (c) 1995 Michael Chastain (mec@shell.portal.com), 15 April 1995.
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 .\" GNU General Public License for more details.
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, write to the Free
22 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
25 .\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
26 .\" Modified 1997-07-30 by Paul Slootman <paul@wurtel.demon.nl>
27 .\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
29 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
30 .\" all rights reserved.
31 .\" Translated 1997-12-17, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
32 .\" Updated and Modified 2001-06-12,Yuichi SATO <ysato@h4.dion.ne.jp>
33 .\" Updated and Modified 2004-12-28, Yuichi SATO <ysato444@yahoo.co.jp>
34 .\" Updated 2006-07-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.34
37 .\"WORD: algorithm アルゴリズム
39 .\"WORD: parameter パラメーター
41 .\"WORD: super user スーパー・ユーザー
43 .\"WORD: interrupt 割り込み
46 .TH ADJTIMEX 2 2004-05-27 "Linux" "Linux Programmer's Manual"
49 .\"O adjtimex \- tune kernel clock
50 adjtimex \- カーネルの時計を調整する
53 .B #include <sys/timex.h>
55 .BI "int adjtimex(struct timex *" "buf" );
58 .\"O Linux uses David L. Mills' clock adjustment algorithm (see RFC\ 1305).
61 .\"O reads and optionally sets adjustment parameters for this algorithm.
62 Linux は David L. Mill の時計調節アルゴリズムを使用している
66 はこのアルゴリズムの調節のパラメーターを読み取ったり、設定したりする。
67 .\"O It takes a pointer to a
69 .\"O structure, updates kernel parameters from field values,
70 .\"O and returns the same structure with current kernel values.
71 .\"O This structure is declared as follows:
74 構造体へのポインターを受け取り、その値でカーネルのパラメーターを更新して、
81 int modes; /* mode selector */
82 long offset; /* time offset (usec) */
83 long freq; /* frequency offset (scaled ppm) */
84 .\" FIXME -- what is the scaling unit? 2^16 ?
85 long maxerror; /* maximum error (usec) */
86 long esterror; /* estimated error (usec) */
87 int status; /* clock command/status */
88 long constant; /* pll time constant */
89 long precision; /* clock precision (usec) (read-only) */
90 long tolerance; /* clock frequency tolerance (ppm)
92 struct timeval time; /* current time (read-only) */
93 long tick; /* usecs between clock ticks */
100 .\"O field determines which parameters, if any, to set.
101 .\"O It may contain a
103 .\"O combination of zero or more of the following bits:
105 フィールドは (必要に応じて) どのパラメーターを設定するか決定する。
112 #define ADJ_OFFSET 0x0001 /* time offset */
113 #define ADJ_FREQUENCY 0x0002 /* frequency offset */
114 #define ADJ_MAXERROR 0x0004 /* maximum time error */
115 #define ADJ_ESTERROR 0x0008 /* estimated time error */
116 #define ADJ_STATUS 0x0010 /* clock status */
117 #define ADJ_TIMECONST 0x0020 /* pll time constant */
118 #define ADJ_TICK 0x4000 /* tick value */
119 #define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime() */
123 .\"O Ordinary users are restricted to a zero value for
125 .\"O Only the superuser may set any parameters.
129 スーパー・ユーザーのみが全てのパラメーターを設定できる。
132 .\"O .SH "RETURN VALUE"
136 .\"O returns the clock state:
144 #define TIME_OK 0 /* clock synchronized */
145 #define TIME_INS 1 /* insert leap second */
146 #define TIME_DEL 2 /* delete leap second */
147 #define TIME_OOP 3 /* leap second in progress */
148 #define TIME_BAD 4 /* clock not synchronized */
154 .\"O returns \-1 and sets
166 .\"O does not point to writable memory.
171 .\"O An attempt is made to set
173 .\"O to a value outside the range \-131071 to +131071,
176 .\"O to a value other than those listed above,
179 .\"O to a value outside the range
182 .\"O .RB 1100000/ HZ ,
185 .\"O is the system timer interrupt frequency.
187 へ \-131071 〜 +131071 の範囲以外の値を設定しようとしたか、
198 はシステムのタイマー割り込みの周期である。
202 .\"O is nonzero and the caller does not have sufficient privilege.
204 が 0 でなく、かつ呼び出し元が十分な特権を持っていない。
207 .\"O capability is required.
211 .\"O .SH "CONFORMING TO"
214 .\"O is Linux-specific and should not be used in programs
215 .\"O intended to be portable.
218 .\"O for a more portable, but less flexible,
219 .\"O method of adjusting the system clock.
222 移植を意図したプログラムで使用すべきではない。
229 .BR settimeofday (2),
231 .BR capabilities (7),