reference/info/functions/getrusage.xml
e947f2e12b1e321d67f6560c5f2884e6d885858f
...
...
@@ -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,31 @@
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.
44
+
</para>
45
+
</refsect1>
46
+

47
+
<refsect1 role="changelog">
48
+
&reftitle.changelog;
49
+
<para>
50
+
<informaltable>
51
+
<tgroup cols="2">
52
+
<thead>
53
+
<row>
54
+
<entry>&Version;</entry>
55
+
<entry>&Description;</entry>
56
+
</row>
57
+
</thead>
58
+
<tbody>
59
+
<row>
60
+
<entry>7.0.0</entry>
61
+
<entry>
62
+
This function is now supported on Windows.
63
+
</entry>
64
+
</row>
65
+
</tbody>
66
+
</tgroup>
67
+
</informaltable>
43
68
</para>
44
69
</refsect1>
45
70

...
...
@@ -68,6 +93,7 @@ echo $dat["ru_nswap"]; // number of swaps
68
93
echo $dat["ru_utime.tv_usec"]; // user time used (microseconds)
69
94
echo $dat["ru_utime.tv_sec"]; // user time used (seconds)
70
95
echo $dat["ru_stime.tv_usec"]; // system time used (microseconds)
96
+
echo $dat["ru_stime.tv_sec"]; // system time used (seconds)
71
97
?>
72
98
]]>
73
99
</programlisting>
...
...
@@ -75,30 +101,6 @@ echo $dat["ru_stime.tv_usec"]; // system time used (microseconds)
75
101
</para>
76
102
</refsect1>
77
103

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
104
<refsect1 role="notes">
103
105
&reftitle.notes;
104
106
<note>
...
...
@@ -113,17 +115,17 @@ echo $dat["ru_stime.tv_usec"]; // system time used (microseconds)
113
115
<member><literal>"ru_utime.tv_sec"</literal></member>
114
116
<member><literal>"ru_utime.tv_usec"</literal></member>
115
117
<member>
116
-
<literal>"ru_majflt"</literal> (only if <parameter>who</parameter> is
118
+
<literal>"ru_majflt"</literal> (only if <parameter>mode</parameter> is
117
119
<constant>RUSAGE_SELF</constant>)
118
120
</member>
119
121
<member>
120
-
<literal>"ru_maxrss"</literal> (only if <parameter>who</parameter> is
122
+
<literal>"ru_maxrss"</literal> (only if <parameter>mode</parameter> is
121
123
<constant>RUSAGE_SELF</constant>)
122
124
</member>
123
125
</simplelist>
124
126
</para>
125
127
<para>
126
-
If <function>getrusage</function> is called with <parameter>who</parameter>
128
+
If <function>getrusage</function> is called with <parameter>mode</parameter>
127
129
set to <literal>1</literal> (<constant>RUSAGE_CHILDREN</constant>), then
128
130
resource usage for threads are collected (meaning that internally the function
129
131
is called with <constant>RUSAGE_THREAD</constant>).
...
...
@@ -154,7 +156,6 @@ echo $dat["ru_stime.tv_usec"]; // system time used (microseconds)
154
156
</refsect1>
155
157

156
158
</refentry>
157
-

158
159
<!-- Keep this comment at the end of the file
159
160
Local variables:
160
161
mode: sgml
161
162