Files
Leonardo Lara Rodrigues 0bda04ccd6 Translation of reference/misc/functions (#441)
* new translations of misc functions
* new translation of reference/misc/ini.xml
2023-12-17 10:15:01 -03:00

106 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 0c9c2dd669fe9395eaa73d487fbd160f9057429a Maintainer: leonardolara Status: ready -->
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.hrtime">
<refnamediv>
<refname>hrtime</refname>
<refpurpose>Obtém o tempo de alta resolução do sistema</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>array</type><type>int</type><type>float</type><type>false</type></type><methodname>hrtime</methodname>
<methodparam choice="opt"><type>bool</type><parameter>as_number</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<simpara>
Retorna o tempo em alta resolução do sistema, contado a partir de um ponto arbitrário no tempo.
O timestamp fornecido é monotônico e não pode ser ajustado.
</simpara>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>as_number</parameter></term>
<listitem>
<para>
Define se o tempo em alta resolução deve ser retornado como <type>array</type>
ou como número.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Retorna um array de inteiros na forma [segundos, nanossegundos], se o
parâmetro <parameter>as_number</parameter> for falso. Caso contrário, os nanossegundos
são retornados como <type>int</type> (plataformas 64 bits) ou <type>float</type>
(plataformas 32 bits).
Retorna &false; em caso de falha.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Uso de <function>hrtime</function></title>
<programlisting role="php">
<![CDATA[
<?php
echo hrtime(true), PHP_EOL;
print_r(hrtime());
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
10444739687370679
Array
(
[0] => 10444739
[1] => 687464812
)
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member>A extensão de <link linkend="book.hrtime">Tempo de alta resolução</link></member>
<member><function>microtime</function></member>
</simplelist>
</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:"~/.phpdoc/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
-->