OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / difftime.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified Sat Jul 24 19:48:17 1993 by Rik Faith (faith@cs.unc.edu)
28 .\"
29 .\" Japanese Version Copyright (c) 1997 NAGOYA Hiroaki
30 .\"         all rights reserved.
31 .\" Translated Mon Feb 10 1997 by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
32 .\" Updated & Modified Sat Mar 23 23:57:43 JST 2002
33 .\"          by Yuichi SATO <ysato@h4.dion.ne.jp>
34 .\"
35 .\"WORD:        epoch   紀元
36 .\"
37 .TH DIFFTIME 3  2010-02-25 "GNU" "Linux Programmer's Manual"
38 .\"O .SH NAME
39 .SH 名前
40 .\"O difftime \- calculate time difference
41 difftime \- 時刻の間隔の計算
42 .\"O .SH SYNOPSIS
43 .SH 書式
44 .nf
45 .B #include <time.h>
46 .sp
47 .BI "double difftime(time_t " time1 ", time_t " time0 );
48 .fi
49 .\"O .SH DESCRIPTION
50 .SH 説明
51 .\"O The
52 .\"O .BR difftime ()
53 .\"O function returns the number of seconds elapsed
54 .\"O between time \fItime1\fP and time \fItime0\fP, represented as a
55 .\"O .IR double .
56 .\"O Each of the times is specified in calendar time, which means its
57 .\"O value is a measurement (in seconds) relative to the
58 .\"O Epoch, 1970-01-01 00:00:00 +0000 (UTC).
59 関数
60 .BR difftime ()
61 は時刻 \fItime0\fP から
62 時刻 \fItime1\fP までの経過時間を
63 .I double
64 型で返す。各々の時刻はカレンダー時間で指定する。
65 つまり、紀元 (Epoch; 1970-01-01 00:00:00 +0000 (UTC)) からの
66 経過時間を秒単位で指定する。
67 .\"O .SH "CONFORMING TO"
68 .SH 準拠
69 SVr4, 4.3BSD, C89, C99.
70 .\"O .SH NOTES
71 .SH 注意
72 .\"O On a POSIX system,
73 .\"O .I time_t
74 .\"O is an arithmetic type, and one could just
75 .\"O define
76 POSIX システムでは
77 .I time_t
78 は数値型なので、引き算の際に起こる可能性のあるオーバーフローを
79 気にしない場合は、単純に
80 .RS
81 .nf
82
83 #define difftime(t1,t0) (double)(t1 \- t0)
84
85 .fi
86 .RE
87 .\"O when the possible overflow in the subtraction is not a concern.
88 と定義できる。
89 .\"O On other systems, the data type
90 .\"O .I time_t
91 .\"O might use some other encoding
92 .\"O where subtraction doesn't work directly.
93 他のシステムでは、データ型
94 .I time_t
95 に何か別のエンコーディングが使われていることがあり、
96 その場合には直接引き算を行うことはできない。
97 .\"O .SH "SEE ALSO"
98 .SH 関連項目
99 .BR date (1),
100 .BR gettimeofday (2),
101 .BR time (2),
102 .BR ctime (3),
103 .BR gmtime (3),
104 .BR localtime (3)