<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.misc.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.time-sleep-until.php',
    1 => 'time_sleep_until',
    2 => 'Arr&ecirc;te le script pendant une dur&eacute;e sp&eacute;cifi&eacute;e',
  ),
  'up' => 
  array (
    0 => 'ref.misc.php',
    1 => 'Fonctions diverses',
  ),
  'prev' => 
  array (
    0 => 'function.time-nanosleep.php',
    1 => 'time_nanosleep',
  ),
  'next' => 
  array (
    0 => 'function.uniqid.php',
    1 => 'uniqid',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/misc/functions/time-sleep-until.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.time-sleep-until" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">time_sleep_until</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.1.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">time_sleep_until</span> &mdash; <span class="dc-title">
   Arrête le script pendant une durée spécifiée
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.time-sleep-until-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>time_sleep_until</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$timestamp</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Arrête le script jusqu&#039;à l&#039;instant indiqué par le paramètre
   <code class="parameter">timestamp</code>.
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.time-sleep-until-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">timestamp</code></dt>
     <dd>
      <p class="para">
       Le timestamp correspondant à l&#039;instant où le script doit se réveiller.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.time-sleep-until-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Cette fonction retourne <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> en cas de succès ou <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si une erreur survient.
  </p>
 </div>

 
 <div class="refsect1 errors" id="refsect1-function.time-sleep-until-errors">
  <h3 class="title">Erreurs / Exceptions</h3>
  <p class="para">
   Si l&#039;instant indiqué par <code class="parameter">timestamp</code> est dans le passé,
   <span class="function"><strong>time_sleep_until()</strong></span> générera une alerte
   de niveau <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong>.
  </p>
 </div>

 
 <div class="refsect1 examples" id="refsect1-function.time-sleep-until-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemple #1 Exemple avec <span class="function"><strong>time_sleep_until()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">// Retourne false et génère une alerte<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">time_sleep_until</span><span style="color: #007700">(</span><span style="color: #0000BB">time</span><span style="color: #007700">()-</span><span style="color: #0000BB">1</span><span style="color: #007700">));<br /><br /></span><span style="color: #FF8000">// Fonctionnera que sur les ordinateurs rapides, stoppera le script 0.2 secondes<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">time_sleep_until</span><span style="color: #007700">(</span><span style="color: #0000BB">microtime</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">)+</span><span style="color: #0000BB">0.2</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>

 
 <div class="refsect1 notes" id="refsect1-function.time-sleep-until-notes">
  <h3 class="title">Notes</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <span class="simpara">
    Tous les signaux seront délivrés une fois la reprise du script.
   </span>
  </p></blockquote>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.time-sleep-until-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.sleep.php" class="function" rel="rdfs-seeAlso">sleep()</a> - Arr&ecirc;te l'ex&eacute;cution durant quelques secondes</span></li>
    <li><span class="function"><a href="function.usleep.php" class="function" rel="rdfs-seeAlso">usleep()</a> - Arr&ecirc;te l'ex&eacute;cution durant quelques microsecondes</span></li>
    <li><span class="function"><a href="function.time-nanosleep.php" class="function" rel="rdfs-seeAlso">time_nanosleep()</a> - Attendre pendant un nombre de secondes et de nanosecondes</span></li>
    <li><span class="function"><a href="function.set-time-limit.php" class="function" rel="rdfs-seeAlso">set_time_limit()</a> - Fixe le temps maximum d'ex&eacute;cution d'un script</span></li>
   </ul>
  </p>
 </div>

 
</div><?php manual_footer($setup); ?>