OSDN Git Service

(split) LDP: Update release pages based on LDP 3.54 release
[linuxjm/LDP_man-pages.git] / release / man3 / timeradd.3
index c130dde..31917fd 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (c) 2007 by Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" 2007-07-31, mtk, Created
 .\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
 .\" Japanese Version Copyright (c) 2007  Akihiro MOTOKI
 .\"         all rights reserved.
 .\" Translated 2007-10-16, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.66
 .\" Updated 2009-04-24, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.20
-.\" 
-.TH TIMERADD 3 2010-02-25 "Linux" "Linux Programmer's Manual"
-.SH Ì¾Á°
-timeradd, timersub, timercmp, timerclear, timerisset \- timeval ¤ÎÁàºî
-.SH ½ñ¼°
+.\"
+.TH TIMERADD 3 2010\-02\-25 Linux "Linux Programmer's Manual"
+.SH 名前
+timeradd, timersub, timercmp, timerclear, timerisset \- timeval の操作
+.SH 書式
 .nf
-.B #include <sys/time.h>
+\fB#include <sys/time.h>\fP
 
-.BI "void timeradd(struct timeval *" a ", struct timeval *" b ,
-.BI "              struct timeval *" res );
+\fBvoid timeradd(struct timeval *\fP\fIa\fP\fB, struct timeval *\fP\fIb\fP\fB,\fP
+\fB              struct timeval *\fP\fIres\fP\fB);\fP
 
-.BI "void timersub(struct timeval *" a ", struct timeval *" b ,
-.BI "              struct timeval *" res );
+\fBvoid timersub(struct timeval *\fP\fIa\fP\fB, struct timeval *\fP\fIb\fP\fB,\fP
+\fB              struct timeval *\fP\fIres\fP\fB);\fP
 
-.BI "void timerclear(struct timeval *" tvp );
+\fBvoid timerclear(struct timeval *\fP\fItvp\fP\fB);\fP
 
-.BI "int timerisset(struct timeval *" tvp );
+\fBint timerisset(struct timeval *\fP\fItvp\fP\fB);\fP
 
-.BI "int timercmp(struct timeval *" a ", struct timeval *" b ", " CMP );
+\fBint timercmp(struct timeval *\fP\fIa\fP\fB, struct timeval *\fP\fIb\fP\fB, \fP\fICMP\fP\fB);\fP
 .fi
 .sp
 .in -4n
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
-.RB ( feature_test_macros (7)
-»²¾È):
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
 .in
 .sp
-¾åµ­¤ÎÁ´¤Æ¤Î´Ø¿ô:
-_BSD_SOURCE
-.SH ÀâÌÀ
-.I timeval
-¹½Â¤ÂΤòÁàºî¤¹¤ë¤¿¤á¤Î¥Þ¥¯¥í¤¬Ä󶡤µ¤ì¤Æ¤¤¤ë¡£
-.I timeval
-¹½Â¤ÂΤÏ
-.I <sys/time.h>
-¤Ç°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
+上記の全ての関数: _BSD_SOURCE
+.SH 説明
+\fItimeval\fP 構造体を操作するためのマクロが提供されている。 \fItimeval\fP 構造体は \fI<sys/time.h>\fP
+で以下のように定義されている。
 .sp
 .in +4n
 .nf
 struct timeval {
-    time_t      tv_sec;     /* Éà*/
-    suseconds_t tv_usec;    /* ¥Þ¥¤¥¯¥íÉà*/
+    time_t      tv_sec;     /*  */
+    suseconds_t tv_usec;    /* マイクロ秒 */
 };
 .fi
 .in
 .PP
-.BR timeradd ()
-¤Ï¡¢
-.I a
-¤È
-.I b
-¤Î»þ¹ïÃͤò²Ã»»¤·¡¢¤½¤Î¹ç·×¤ò
-.I res
-¤Ë¤è¤ê»²¾È¤µ¤ì¤ë
-.I timeval
-¹½Â¤ÂΤ˳ÊǼ¤¹¤ë¡£·ë²Ì¤Ï¡¢
-.I res\->tv_usec
-¤ÎÃͤ¬ 0 ¤«¤é 999,999 ¤ÎÈϰϤËÆþ¤ë¤è¤¦¤ËÀµµ¬²½¤µ¤ì¤ë¡£
+\fBtimeradd\fP()  は、 \fIa\fP と \fIb\fP の時刻値を加算し、その合計を \fIres\fP により参照される \fItimeval\fP
+構造体に格納する。結果は、 \fIres\->tv_usec\fP の値が 0 から 999,999 の範囲に入るように正規化される。
 
-.BR timersub ()
-¤Ï¡¢
-.I a
-¤Î»þ¹ïÃͤ«¤é
-.I b
-¤Î»þ¹ïÃͤò¸º»»¤·¡¢¤½¤Î·ë²Ì¤ò
-.I res
-¤Ë¤è¤ê»²¾È¤µ¤ì¤ë
-.I timeval
-¹½Â¤ÂΤ˳ÊǼ¤¹¤ë¡£·ë²Ì¤Ï¡¢
-.I res\->tv_usec
-¤ÎÃͤ¬ 0 ¤«¤é 999,999 ¤ÎÈϰϤËÆþ¤ë¤è¤¦¤ËÀµµ¬²½¤µ¤ì¤ë¡£
+\fBtimersub\fP()  は、 \fIa\fP の時刻値から \fIb\fP の時刻値を減算し、その結果を \fIres\fP により参照される \fItimeval\fP
+構造体に格納する。結果は、 \fIres\->tv_usec\fP の値が 0 から 999,999 の範囲に入るように正規化される。
 
-.BR timerclear ()
-¤Ï
-.I tvp
-¤Ë¤è¤ê»²¾È¤µ¤ì¤ë
-.I timeval
-¹½Â¤ÂΤò 0 ¤ÇËä¤á¤ë¡£
-0 ¤ÇËä¤á¤é¤ì¤¿
-.I timeval
-¹½Â¤ÂΤϡ¢»þ¹ïµª¸µ (Epoch; 1970-01-01 00:00:00 +0000 (UTC)) ¤òɽ¤¹¡£
+\fBtimerclear\fP()  は \fItvp\fP により参照される \fItimeval\fP 構造体を 0 で埋める。 0 で埋められた
+\fItimeval\fP 構造体は、時刻紀元 (Epoch; 1970\-01\-01 00:00:00 +0000 (UTC)) を表す。
 
-.BR timerisset ()
-¤Ï¡¢
-.I tvp
-¤Ë¤è¤ê»²¾È¤µ¤ì¤ë
-.I timeval
-¹½Â¤ÂΤΤ¤¤º¤ì¤«°ìÊý¤Î¥Õ¥£¡¼¥ë¥É¤Ë 0 °Ê³°¤ÎÃͤ¬Æþ¤Ã¤Æ¤¤¤ì¤Ð¡¢
-¿¿ (0 °Ê³°) ¤òÊÖ¤¹¡£
+\fBtimerisset\fP()  は、 \fItvp\fP により参照される \fItimeval\fP 構造体のいずれか一方のフィールドに 0
+以外の値が入っていれば、 真 (0 以外) を返す。
 
-.BR timercmp ()
-¤Ï
-.I a
-¤È
-.I b
-¤Î»þ¹ïÃͤòÈæ³Ó±é»»»Ò
-.I CMP
-¤ò»È¤Ã¤ÆÈæ³Ó¤·¡¢Èæ³Ó·ë²Ì¤Ë´ð¤Å¤­¡¢¿¿ (0 °Ê³°) ¤«µ¶ (0) ¤òÊÖ¤¹¡£
-(Linux/glibc ¤Ï¤½¤¦¤Ç¤Ï¤Ê¤¤¤¬)
-¤¤¤¯¤Ä¤«¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¡¢
-.BRr timercmp ()
-¤Î¼ÂÁõ¤¬¤ª¤«¤·¤¯¡¢
-.\" HP-UX, Tru64, Irix ¤Ç¤Ï°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
+.\" HP-UX, Tru64, Irix have a definition like:
 .\"#define timercmp(tvp, uvp, cmp) \
 .\"    ((tvp)->tv_sec cmp (uvp)->tv_sec || \
 .\"    (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec)
-.I CMP
-¤Ë
-.IR >= ,
-.IR <= ,
-.I ==
-¤ò»ØÄꤹ¤ë¤ÈÀµ¤·¤¯Æ°ºî¤·¤Ê¤¤¡£
-°Ü¿¢À­¤¬É¬Íפʥ¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤Ï¡¢
-Âå¤ï¤ê¤Ë°Ê²¼¤ò»È¤¦¤³¤È¡£
+\fBtimercmp\fP()  は \fIa\fP と \fIb\fP の時刻値を比較演算子 \fICMP\fP を使って比較し、比較結果に基づき、真 (0 以外) か偽
+(0) を返す。 (Linux/glibc はそうではないが)  いくつかのシステムでは、 \fBtimercmp\fP()  の実装がおかしく、
+\fICMP\fP に \fI>=\fP, \fI<=\fP, \fI==\fP を指定すると正しく動作しない。 移植性が必要なアプリケーションでは、
+代わりに以下を使うこと。
 
     !timercmp(..., <)
     !timercmp(..., >)
     !timercmp(..., !=)
-.SH ÊÖ¤êÃÍ
-.BR timerisset ()
-¤È
-.BR timercmp ()
-¤Ï¡¢¿¿ (0 °Ê³°) ¤«µ¶ (0) ¤òÊÖ¤¹¡£
-.BR
-.SH ¥¨¥é¡¼
-¥¨¥é¡¼¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
-.SH ½àµò
-POSIX.1-2001 ¤Ë¤Ï¤Ê¤¤¡£
-¤Û¤È¤ó¤É¤Î BSD Í³Íè¤Î¥·¥¹¥Æ¥à¤Ë¤Ï¸ºß¤¹¤ë¡£
-.SH ´ØÏ¢¹àÌÜ
-.BR gettimeofday (2),
-.BR time (7)
+.SH 返り値
+\fBtimerisset\fP()  と \fBtimercmp\fP()  は、真 (0 以外) か偽 (0) を返す。
+.SH エラー
+エラーは定義されていない。
+.SH 準拠
+POSIX.1\-2001 にはない。 ほとんどの BSD 由来のシステムには存在する。
+.SH 関連項目
+\fBgettimeofday\fP(2), \fBtime\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。