OSDN Git Service

(split) Add translated date for some pages.
[linuxjm/LDP_man-pages.git] / release / man3 / clock.3
1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
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 .\" License.
23 .\" Modified Sat Jul 24 21:27:01 1993 by Rik Faith (faith@cs.unc.edu)
24 .\" Modified 14 Jun 2002, Michael Kerrisk <mtk.manpages@gmail.com>
25 .\"     Added notes on differences from other UNIX systems with respect to
26 .\"     waited-for children.
27 .\"
28 .\" Japanese Version Copyright (c) 1996 Hiroaki Nagoya
29 .\"         all rights reserved.
30 .\" Translated Mon Feb  3 15:35:19 JST 1997
31 .\"         by Hiroaki Nagoya <nagoya@is.titech.ac.jp>
32 .\" Updated Fri Sep 27 JST 2002 by Kentaro Shirakata <argrath@ub32.org>
33 .\" Updated 2007-05-28, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.48
34 .\"
35 .\"WORD: processor time   ¥×¥í¥»¥Ã¥µ»þ´Ö
36 .\"WORD: CPU time         CPU»þ´Ö
37 .\"
38 .TH CLOCK 3  2008-08-28 "GNU" "Linux Programmer's Manual"
39 .SH Ì¾Á°
40 clock \- ¥×¥í¥»¥Ã¥µ»þ´Ö¤Î¼èÆÀ
41 .SH ½ñ¼°
42 .nf
43 .B #include <time.h>
44 .sp
45 .B clock_t clock(void);
46 .fi
47 .SH ÀâÌÀ
48 .BR clock ()
49 ¤Ï¥×¥í¥°¥é¥à¤Î»ÈÍѤ·¤¿¥×¥í¥»¥Ã¥µ»þ´Ö¤Î¶á»÷ÃͤòÊÖ¤¹¡£
50 .SH ÊÖ¤êÃÍ
51 ÊÖ¤êÃͤÏ
52 .I clock_t
53 ñ°Ì¤Ç¤Î CPU »þ´Ö¤Ç¤¢¤ë¡£
54 ÉÃñ°Ì¤Ç¤ÎÃͤòÆÀ¤ë¤¿¤á¤Ë¤Ï
55 .B CLOCKS_PER_SEC
56 ¤Ç³ä¤ì¤Ð¤è¤¤¡£
57 »ÈÍѤ·¤¿¥×¥í¥»¥Ã¥µ»þ´Ö¤¬ÆÀ¤é¤ì¤Ê¤¤¾ì¹ç¤ä¡¢¤½¤ÎÃͤòɽ¸½¤Ç¤­¤Ê¤¤¾ì¹ç¡¢
58 ¤³¤Î´Ø¿ô¤Ï
59 .I (clock_t)\ \-1
60 ¤òÊÖ¤¹¡£
61 .SH ½àµò
62 C89, C99, POSIX.1-2001.
63 POSIX ¤Ï¼ÂºÝ¤ÎÀºÅ٤ˤϤè¤é¤º
64 .B CLOCKS_PER_SEC
65 ¤¬ 1000000 ¤Ç¤¢¤ë¤³¤È¤òÍ׵ᤷ¤Æ¤¤¤ë¡£
66 .SH Ãí°Õ
67 C ¤Îɸ½àµ¬³Ê¤Ç¤Ï¥×¥í¥°¥é¥à¤Î³«»Ï¤Î»þÅÀ¤Ç¤Ï¤É¤ó¤ÊÃͤ¬Ê֤äƤ­¤Æ¤â
68 ¤«¤Þ¤ï¤Ê¤¤¡£
69 °Ü¿¢À­¤òºÇÂç¸Â³ÎÊݤ¹¤ë¤¿¤á¤Ë¤Ï¡¢¥×¥í¥°¥é¥à¤Î³«»Ï»þ¤Ë
70 .BR clock ()
71 ¤ò¸Æ¤Ó½Ð¤·¤Æ¤½¤ÎÃͤòº¹¤·°ú¤¯¤³¤È¡£
72 .PP
73 »þ¹ï¤Ï·å¤¢¤Õ¤ì¤¹¤ë²ÄǽÀ­¤¬¤¢¤ëÅÀ¤ËÃí°Õ¤¹¤ë¤³¤È¡£
74 .B CLOCKS_PER_SEC
75 ¤¬ 1000000 ¤Ç¤¢¤ë 32 ¥Ó¥Ã¥È¥·¥¹¥Æ¥à¤Ç¤Ï¡¢
76 ¤³¤Î´Ø¿ô¤ÏÌó 72 Ê¬Ëè¤ËƱ¤¸ÃͤòÊÖ¤¹¤³¤È¤Ë¤Ê¤ë¡£
77 .PP
78 ¼ÂÁõ¤Ë¤è¤Ã¤Æ¤Ï¡¢
79 .BR clock ()
80 ¤ÇÊÖ¤µ¤ì¤ëÃͤË
81 .BR wait (2)
82 (¤¢¤ë¤¤¤Ï¤½¤Î¾¤Î wait ¤Î¤è¤¦¤Ê´Ø¿ô) ¤Ç¼ý½¸¤µ¤ì¤¿
83 »Ò¥×¥í¥»¥¹¤Î»þ´Ö¤¬´Þ¤Þ¤ì¤ë¾ì¹ç¤â¤¢¤ë¡£
84 Linux ¤Ç¤Ï¡¢
85 .BR clock ()
86 ¤¬ÊÖ¤¹ÃͤˤϠwait ¤µ¤ì¤¿»Ò¥×¥í¥»¥¹¤Î»þ´Ö¤Ï´Þ¤Þ¤ì¤Ê¤¤¡£
87 .\" I have seen this behavior on Irix 6.3, and the OSF/1, HP/UX, and
88 .\" Solaris manual pages say that clock() also does this on those systems.
89 .\" POSIX.1-2001 doesn't explicitly allow this, nor is there an
90 .\" explicit prohibition. -- MTK
91 .BR times (2)
92 ´Ø¿ô¤Ï¸Æ¤Ó½Ð¤·¸µ¤È¤½¤Î»Ò¥×¥í¥»¥¹¤Ë´Ø¤¹¤ë¾ðÊó¤ò
93 (ÊÌ¡¹¤Ë) ÌÀ¼¨Åª¤ËÊÖ¤¹¤Î¤Ç¡¢¤è¤ê¹¥¤Þ¤·¤¤¤À¤í¤¦¡£
94 .SH ´ØÏ¢¹àÌÜ
95 .BR clock_gettime (2),
96 .BR getrusage (2),
97 .BR times (2)