1
0
mirror of https://github.com/php/doc-it.git synced 2026-03-24 07:32:12 +01:00
Files
Davide Pastore 38346d0e93 Fix all the files without a revision number
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@351268 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-05 15:10:06 +00:00

154 lines
3.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 6ef46c971edd862c39d3b30513e549dacc735e04 Maintainer: reghe Status: ready -->
<refentry xml:id="function.sleep" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>sleep</refname>
<refpurpose>Pausa dell'esecuzione</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>sleep</methodname>
<methodparam><type>int</type><parameter>seconds</parameter></methodparam>
</methodsynopsis>
<simpara>
Mette in pausa l'esecuzione del programma per il numero indicato di
secondi.
</simpara>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>seconds</parameter></term>
<listitem>
<para>
Tempo di pausa in secondi.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Ritorna zero in caso di successo o &false; in caso di errore.
</para>
<para>
Se la chiamata viene interrotta da un segnale, <function>sleep</function> ritorna
un valore non-zero. Su Windows questo valore è sempre
<literal>192</literal> (cioè il valore di
<constant>WAIT_IO_COMPLETION</constant> nelle Windows API).
In altre piattaforme il valore di ritorno è il numero di secondi rimanenti di
pausa.
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
<para>
Se <parameter>seconds</parameter> (cioè il numero di secondi specificato) è negativo,
la funzione genera un errore <constant>E_WARNING</constant>.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>5.3.4</entry>
<entry>
Prima di PHP 5.3.4 in Windows, <function>sleep</function> ritorna
sempre &null; quando è eseguita, a prescindere dal fatto che sia stata
interrotta o meno.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Esempio <function>sleep</function></title>
<programlisting role="php">
<![CDATA[
<?php
// current time
echo date('h:i:s') . "\n";
// sleep for 10 seconds
sleep(10);
// wake up !
echo date('h:i:s') . "\n";
?>
]]>
</programlisting>
<para>
Questo esempio stampa (dopo 10 secondi)
</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:"~/.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
-->