File: times.2

package info (click to toggle)
manpages-ja 0.4.0.0.20020315-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 14,808 kB
  • ctags: 4
  • sloc: sh: 9,595; perl: 157; makefile: 62
file content (147 lines) | stat: -rw-r--r-- 4,299 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
.\"
.\" 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.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one
.\" 
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\" 
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Modified by Michael Haardt (michael@moria.de)
.\" Modified Sat Jul 24 14:29:17 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified 961203 and 001211 and 010326 by aeb@cwi.nl
.\" Modified 001213 by Michael Haardt (michael@moria.de)
.\"
.\" Japanese Version Copyright (c) 1996 Satoshi Nozawa
.\"         all rights reserved.
.\" Translated Tue Jun 25 09:10:20 JST 1996
.\"         by Satoshi I. Nozawa <snozawa@env.sci.ibaraki.ac.jp>
.\" Modified Sun Dec 14 10:34:47 JST 1997
.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\" Updated Fri Feb 16 15:06:46 JST 2001
.\"         by Kentaro Shirakata <argrath@ub32.org>
.\" Updated Tue Apr 10 12:17:44 JST 2001
.\"         by Kentaro Shirakata <argrath@ub32.org>
.\" Updated Mon May 21 01:55:50 JST 2001
.\"         by Kentaro Shirakata <argrath@ub32.org>
.\"
.\" WORD:	clock ticks	å
.\"
.TH TIMES 2 "11 December 2000" "Linux" "Linux Programmer's Manual"
.SH ̾
times - ץ֤
.SH 
.B #include <sys/times.h>
.sp
.BI "clock_t times(struct tms *" buf );
.SH 
.BR times ()
ؿϸߤΥץ֤
.I buf
ؤƤ
.B "struct tms"
˳Ǽ롣
.I struct tms

.I <sys/times.h>
ǰʲΤ褦Ƥ:
.sp
.nf
struct  tms  {
.RS
clock_t tms_utime;  /* user time */
clock_t tms_stime;  /* system time */
clock_t tms_cutime; /* user time of children */
clock_t tms_cstime; /* system time of children */
.RE
};
.fi
.LP
.I tms_utime
եɤϡƤӽФץ̿¹ԤΤ˾񤷤
CPU ֤Ǥ롣
.I tms_stime
եɤϡƤӽФץΤ˼¹Ԥ줿ǡ
ƥब񤷤 CPU ֤Ǥ롣
.I tms_cutime
եɤϡ
λԤäƤƤλҥץ
.I tms_utime

.I tms_cutime
ιפǤ롣
.I tms_cstime
եɤϡ
λԤäƤƤλҥץ
.I tms_stime

.I tms_cstime
ιפǤ롣
.LP
λ(ڤӤλ¹)ץλ֤
.BR wait (2)

.BR waitpid (2)
ץ ID ִ֤֤˲û롣
ĤޤꡢҤޤλԤäƤʤ֤Ǥ
¹ץλ֤Ϸ褷Ƹʤ
.LP
Ƥλ֤ϥå֤롣
.SH ֤
.B times
ؿϲΤвᤷå (clock tick) ֤
Linux ǤϤΡ֤פȤϥƥबưִ֤Ǥ롣
֤ͤ clock_t ϰϤ饪Сե뤫⤷ʤ
顼ξ硢(clock_t) \-1 ֤졢
.I errno
Ŭڤꤵ롣
.SH 
äΥå
.RS
sysconf(_SC_CLK_TCK);
.RE
Ȥä뤳Ȥ롣
POSIX-1996 ǤϡCLK_TCK ܥ
.RI ( <time.h>
Ƥ) ϸŤΤǤȵҤƤ롣
ǤϤϸŤΤǤ롣
.LP
.BR clock (3)
 clock_t ֤ͤϥåǤϤʤ CLOCKS_PER_SEC 
ñ̤Ǥ뤳Ȥդ뤳ȡ
.SH 
SVr4, SVID, POSIX, X/OPEN, BSD 4.3
.SH 
SVr1-3 Ǥ
.B long
֤¤ΤΥФ
.B time_t
ȤäƤÿǤϤʤåǼƤ
V7 ǤϹ¤ΤΥФ
.B long
ȤäƤޤ
.B time_t
ʤäǤ롣
.PP
ŤƥǤϰäΥå HZ ѿͿ롣
.SH Ϣ
.BR time (1),
.BR getrusage (2),
.BR wait (2),
.BR clock (3),
.BR sysconf (3)