OSDN Git Service

(split) LDP: Update release pages (with po4a --force)
[linuxjm/LDP_man-pages.git] / release / man2 / times.2
index 158ed3f..53e3c17 100644 (file)
@@ -107,15 +107,11 @@ Linux では、 \fIbuf\fP 引数に NULL を指定することができ、その
 .\" .PP
 .\" On older systems the number of clock ticks per second is given
 .\" by the variable HZ.
-On Linux, the "arbitrary point in the past" from which the return value of
-\fBtimes\fP()  is measured has varied across kernel versions.  On Linux 2.4 and
-earlier this point is the moment the system was booted.  Since Linux 2.6,
-this point is \fI(2^32/HZ) \- 300\fP (i.e., about 429 million) seconds before
-system boot time.  This variability across kernel versions (and across UNIX
-implementations), combined with the fact that the returned value may
-overflow the range of \fIclock_t\fP, means that a portable application would be
-wise to avoid using this value.  To measure changes in elapsed time, use
-\fBclock_gettime\fP(2)  instead.
+Linux では、 \fBtimes\fP()  の返り値を計算する起点となる「過去の任意の時点」は、カーネルのバージョン により異なる。 Linux 2.4
+以前では、この時点はシステムが起動した瞬間である。 Linux 2.6 以降では、この時点はシステム起動時刻の \fI(2^32/HZ) \- 300\fP
+(および 4億2900万) 秒前である。 このようにカーネルバージョン (や UNIX の実装) により異なることと、 返り値が \fIclock_t\fP
+の範囲をオーバーフローする可能性があるという事実を考慮すると、 移植性が必要なアプリケーションではこの値を使うのは避けるのが賢明であろう。
+経過時間を測りたい場合には、代わりに \fBclock_gettime\fP(2)  を使用すること。
 .SS 歴史
 SVr1\-3 では \fIlong\fP を返し、構造体のメンバに \fItime_t\fP 型を使っていたが、紀元からの秒数ではなくクロック数を格納していた。
 V7 では構造体のメンバに \fIlong\fP 型を使っていた。まだ \fItime_t\fP 型がなかったからである。