mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 06:18:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146503 c90b9560-bf6c-de11-be94-00142212c4b1
63 lines
1.8 KiB
XML
63 lines
1.8 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.6 $ -->
|
|
<!-- splitted from ./en/functions/info.xml, last change in rev 1.2 -->
|
|
<refentry id="function.getrusage">
|
|
<refnamediv>
|
|
<refname>getrusage</refname>
|
|
<refpurpose>Gets the current resource usages</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>array</type><methodname>getrusage</methodname>
|
|
<methodparam choice="opt"><type>int</type><parameter>who</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
This is an interface to getrusage(2). It returns an associative
|
|
array containing the data returned from the system call. If who
|
|
is 1, getrusage will be called with RUSAGE_CHILDREN.
|
|
</para>
|
|
<para>
|
|
All entries are accessible by using their documented field names.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title><function>getrusage</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$dat = getrusage();
|
|
echo $dat["ru_nswap"]; // number of swaps
|
|
echo $dat["ru_majflt"]; // number of page faults
|
|
echo $dat["ru_utime.tv_sec"]; // user time used (seconds)
|
|
echo $dat["ru_utime.tv_usec"]; // user time used (microseconds)
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
See your system's man page on getrusage(2) for more details.
|
|
</para>
|
|
¬e.no-windows;
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|