OSDN Git Service

Import translated manuals from JM CVS Repository.
[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)