1
0
mirror of https://github.com/php/doc-ru.git synced 2026-03-26 08:42:13 +01:00
Files
archived-doc-ru/reference/misc/functions/hrtime.xml
Sergey Panteleev 6d43fd64d7 Исправление форматирования
[skip-spellcheck]
[skip-lint]
2022-12-27 03:42:36 +03:00

106 lines
3.3 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 0c9c2dd669fe9395eaa73d487fbd160f9057429a Maintainer: lex Status: ready -->
<!-- Reviewed: no -->
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.hrtime">
<refnamediv>
<refname>hrtime</refname>
<refpurpose>Получить системное время высокого разрешения</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>
Возвращает время высокого разрешения системы, отсчитываемое с произвольной точки времени. Полученная временная метка неизменна и не может быть отрегулирована.
</simpara>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>as_number</parameter></term>
<listitem>
<para>
Должно ли время высокого разрешения возвращаться в виде массива (<type>array</type>) или числа.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает массив целых чисел в формате [секунды, наносекунды], если
параметр <parameter>as_number</parameter> равен false. В противном случае
наносекунды возвращаются в виде целого числа (<type>int</type>) (для 64-битных систем) или <type>float</type>
(для 32-битных систем).
Возвращает &false; в случае возникновения ошибки.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Пример использования <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>Модуль <link linkend="book.hrtime">Время высокого разрешения</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
-->