mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-04-24 17:18:02 +02:00
5f5cba9271
#test new tools git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@274460 c90b9560-bf6c-de11-be94-00142212c4b1
125 lines
2.8 KiB
XML
125 lines
2.8 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.16 $ -->
|
|
<!-- EN-Revision: 1.13 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
|
|
<refentry xml:id="function.sleep" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>sleep</refname>
|
|
<refpurpose>Stoppe l'exécution durant quelques secondes</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>int</type><methodname>sleep</methodname>
|
|
<methodparam><type>int</type><parameter>seconds</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<simpara>
|
|
Retarde l'exécution du programme pendant
|
|
<parameter>seconds</parameter> secondes.
|
|
</simpara>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>seconds</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le retard, en seconde.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Retourne zéro en cas de succès, ou &false; si une erreur survient.
|
|
Si l'appel est inetrrompu par un signal, la fonction
|
|
<function>sleep</function> retournera le nombre de secondes restantes.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
Si le nombre <parameter>seconds</parameter> spécifié est négatif,
|
|
cette fonction génèrera une alerte de niveau
|
|
<constant>E_WARNING</constant>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Exemple avec <function>sleep</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// Heure actuelle
|
|
echo date('h:i:s') . "\n";
|
|
|
|
// Stoppe pour 10 secondes
|
|
sleep(10);
|
|
|
|
// retour !
|
|
echo date('h:i:s') . "\n";
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
Cet exemple affichera (après 10 secondes) :
|
|
</para>
|
|
<screen>
|
|
<![CDATA[
|
|
05:31:23
|
|
05:31:33
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>usleep</function></member>
|
|
<member><function>time_nanosleep</function></member>
|
|
<member><function>time_sleep_until</function></member>
|
|
<member><function>set_time_limit</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</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
|
|
--> |