reference/info/functions/getrusage.xml
a277389c9d2d5a940fcd6dbe62da7e109282379d
a277389c9d2d5a940fcd6dbe62da7e109282379d
...
...
@@ -9,8 +9,8 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>array</type><methodname>getrusage</methodname>
13
-
<methodparam choice="opt"><type>int</type><parameter>who</parameter><initializer>0</initializer></methodparam>
12
+
<type class="union"><type>array</type><type>false</type></type><methodname>getrusage</methodname>
13
+
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer>0</initializer></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
16
This is an interface to <command>getrusage(2)</command>. It gets data returned
...
...
@@ -23,10 +23,10 @@
23
23
<para>
24
24
<variablelist>
25
25
<varlistentry>
26
-
<term><parameter>who</parameter></term>
26
+
<term><parameter>mode</parameter></term>
27
27
<listitem>
28
28
<para>
29
-
If <parameter>who</parameter> is 1, getrusage will be called with
29
+
If <parameter>mode</parameter> is 1, getrusage will be called with
30
30
<constant>RUSAGE_CHILDREN</constant>.
31
31
</para>
32
32
</listitem>
...
...
@@ -40,6 +40,7 @@
40
40
<para>
41
41
Returns an associative array containing the data returned from the system
42
42
call. All entries are accessible by using their documented field names.
43
+
Returns &false; on failure.
43
44
</para>
44
45
</refsect1>
45
46
...
...
@@ -68,6 +69,7 @@ echo $dat["ru_nswap"]; // number of swaps
68
69
echo $dat["ru_utime.tv_usec"]; // user time used (microseconds)
69
70
echo $dat["ru_utime.tv_sec"]; // user time used (seconds)
70
71
echo $dat["ru_stime.tv_usec"]; // system time used (microseconds)
72
+
echo $dat["ru_stime.tv_sec"]; // system time used (seconds)
71
73
?>
72
74
]]>
73
75
</programlisting>
...
...
@@ -75,30 +77,6 @@ echo $dat["ru_stime.tv_usec"]; // system time used (microseconds)
75
77
</para>
76
78
</refsect1>
77
79
78
-
<refsect1 role="changelog">
79
-
&reftitle.changelog;
80
-
<para>
81
-
<informaltable>
82
-
<tgroup cols="2">
83
-
<thead>
84
-
<row>
85
-
<entry>&Version;</entry>
86
-
<entry>&Description;</entry>
87
-
</row>
88
-
</thead>
89
-
<tbody>
90
-
<row>
91
-
<entry>7.0.0</entry>
92
-
<entry>
93
-
This function is now supported on Windows.
94
-
</entry>
95
-
</row>
96
-
</tbody>
97
-
</tgroup>
98
-
</informaltable>
99
-
</para>
100
-
</refsect1>
101
-
102
80
<refsect1 role="notes">
103
81
&reftitle.notes;
104
82
<note>
...
...
@@ -113,17 +91,17 @@ echo $dat["ru_stime.tv_usec"]; // system time used (microseconds)
113
91
<member><literal>"ru_utime.tv_sec"</literal></member>
114
92
<member><literal>"ru_utime.tv_usec"</literal></member>
115
93
<member>
116
-
<literal>"ru_majflt"</literal> (only if <parameter>who</parameter> is
94
+
<literal>"ru_majflt"</literal> (only if <parameter>mode</parameter> is
117
95
<constant>RUSAGE_SELF</constant>)
118
96
</member>
119
97
<member>
120
-
<literal>"ru_maxrss"</literal> (only if <parameter>who</parameter> is
98
+
<literal>"ru_maxrss"</literal> (only if <parameter>mode</parameter> is
121
99
<constant>RUSAGE_SELF</constant>)
122
100
</member>
123
101
</simplelist>
124
102
</para>
125
103
<para>
126
-
If <function>getrusage</function> is called with <parameter>who</parameter>
104
+
If <function>getrusage</function> is called with <parameter>mode</parameter>
127
105
set to <literal>1</literal> (<constant>RUSAGE_CHILDREN</constant>), then
128
106
resource usage for threads are collected (meaning that internally the function
129
107
is called with <constant>RUSAGE_THREAD</constant>).
...
...
@@ -154,7 +132,6 @@ echo $dat["ru_stime.tv_usec"]; // system time used (microseconds)
154
132
</refsect1>
155
133
156
134
</refentry>
157
-
158
135
<!-- Keep this comment at the end of the file
159
136
Local variables:
160
137
mode: sgml
161
138