<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.swoole-timer.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'swoole-timer.list.php',
    1 => 'Swoole\\Timer::list',
    2 => 'Get an iterator over the timers of the current process',
  ),
  'up' => 
  array (
    0 => 'class.swoole-timer.php',
    1 => 'Swoole\\Timer',
  ),
  'prev' => 
  array (
    0 => 'swoole-timer.info.php',
    1 => 'Swoole\\Timer::info',
  ),
  'next' => 
  array (
    0 => 'swoole-timer.set.php',
    1 => 'Swoole\\Timer::set',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/swoole/swoole/timer/list.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="swoole-timer.list" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Swoole\Timer::list</h1>
  <p class="verinfo">(No version information available, might only be in Git)</p><p class="refpurpose"><span class="refname">Swoole\Timer::list</span> &mdash; <span class="dc-title">Get an iterator over the timers of the current process</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-swoole-timer.list-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="modifier">function</span> <span class="methodname"><strong>Swoole\Timer::list</strong></span>(): <span class="type">Swoole\Timer\Iterator</span></div>

  <p class="simpara">
   Returns an iterator over the IDs of the timers created from PHP in the
   current process. Timers created internally by Swoole are not listed.
   As of Swoole 4.4.0.
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-swoole-timer.list-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="simpara">
   Returns a <span class="classname"><strong class="classname">Swoole\Timer\Iterator</strong></span> object, which
   extends <span class="classname"><a href="class.arrayiterator.php" class="classname">ArrayIterator</a></span> and yields the timer IDs as
   <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> values. The iterator is a snapshot taken when the method is
   called; it is empty when no timer exists.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-swoole-timer.list-examples">
  <h3 class="title">Приклади</h3>
  <div class="example" id="example-1">
   <p><strong>Приклад #1 <span class="function"><strong>Swoole\Timer::list()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php
Swoole\Timer</span><span style="color: #007700">::</span><span style="color: #0000BB">tick</span><span style="color: #007700">(</span><span style="color: #0000BB">1000</span><span style="color: #007700">, function () {});
</span><span style="color: #0000BB">Swoole\Timer</span><span style="color: #007700">::</span><span style="color: #0000BB">after</span><span style="color: #007700">(</span><span style="color: #0000BB">5000</span><span style="color: #007700">, function () {});

foreach (</span><span style="color: #0000BB">Swoole\Timer</span><span style="color: #007700">::list() as </span><span style="color: #0000BB">$timer_id</span><span style="color: #007700">) {
    echo </span><span style="color: #0000BB">$timer_id</span><span style="color: #007700">, </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;
    </span><span style="color: #0000BB">Swoole\Timer</span><span style="color: #007700">::</span><span style="color: #0000BB">clear</span><span style="color: #007700">(</span><span style="color: #0000BB">$timer_id</span><span style="color: #007700">);
}
</span><span style="color: #0000BB">?&gt;</span></code></pre></div>
   </div>

   <div class="example-contents"><p>Поданий вище приклад виведе щось
схоже на:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">1
2</pre>
</div>
   </div>
  </div>
 </div>

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