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

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@158105 c90b9560-bf6c-de11-be94-00142212c4b1
81 lines
1.9 KiB
XML
81 lines
1.9 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.7 $ -->
|
|
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.14 -->
|
|
<refentry id="function.usleep">
|
|
<refnamediv>
|
|
<refname>usleep</refname>
|
|
<refpurpose>Delay execution in microseconds</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>void</type><methodname>usleep</methodname>
|
|
<methodparam><type>int</type><parameter>micro_seconds</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<simpara>
|
|
The <function>usleep</function> function delays program execution
|
|
for the given number of <parameter>micro_seconds</parameter>. A
|
|
microsecond is one millionth of a second.
|
|
</simpara>
|
|
<para>
|
|
<example>
|
|
<title><function>usleep</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// Current time
|
|
echo date('h:i:s') . "\n";
|
|
|
|
// wait for 2 secondes
|
|
usleep(2000000);
|
|
|
|
// back!
|
|
echo date('h:i:s') . "\n";
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
This script will output :
|
|
</para>
|
|
<screen>
|
|
<![CDATA[
|
|
11:13:28
|
|
11:13:30
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
<note>
|
|
<simpara>
|
|
This function did not work on Windows systems until PHP 5.0.0
|
|
</simpara>
|
|
</note>
|
|
<simpara>
|
|
See also <function>sleep</function> and
|
|
<function>set_time_limit</function>.
|
|
</simpara>
|
|
</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
|
|
-->
|