mirror of
https://github.com/php/doc-ja.git
synced 2026-04-25 00:48:05 +02:00
1b92d2dd7c
closes: #24
106 lines
2.9 KiB
XML
106 lines
2.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 0c9c2dd669fe9395eaa73d487fbd160f9057429a Maintainer: mumumu 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>システムの高精度な時刻を取得する</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; の場合は、
|
|
[秒, ナノ秒] の形式で数値の配列を返します。
|
|
&true; の場合、ナノ秒を (64ビットプラットフォームの場合) <type>int</type>
|
|
または <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">High resolution timing</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
|
|
-->
|