<?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 => 'pt_BR',
  ),
  'this' => 
  array (
    0 => 'swoole-timer.stats.php',
    1 => 'Swoole\\Timer::stats',
    2 => 'Get timer statistics.',
  ),
  'up' => 
  array (
    0 => 'class.swoole-timer.php',
    1 => 'Swoole\\Timer',
  ),
  'prev' => 
  array (
    0 => 'swoole-timer.set.php',
    1 => 'Swoole\\Timer::set',
  ),
  'next' => 
  array (
    0 => 'swoole-timer.tick.php',
    1 => 'Swoole\\Timer::tick',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/swoole/swoole/timer/stats.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="swoole-timer.stats" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Swoole\Timer::stats</h1>
  <p class="verinfo">(No version information available, might only be in Git)</p><p class="refpurpose"><span class="refname">Swoole\Timer::stats</span> &mdash; <span class="dc-title">Get timer statistics.</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-swoole-timer.stats-description">
  <h3 class="title">Descrição</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::stats</strong></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="simpara">
   Get timer statistics. As of Swoole 4.4.0.
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-swoole-timer.stats-returnvalues">
  <h3 class="title">Valor Retornado</h3>
  <p class="simpara">
   Returns an array with the following keys:
  </p>
  <dl>
   
    <dt><code class="literal">initialized</code></dt>
    <dd>
     <p class="simpara">
      Whether the timer subsystem has been started. It is <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> until the
      first timer is created.
     </p>
    </dd>
   
   
    <dt><code class="literal">num</code></dt>
    <dd>
     <p class="simpara">
      The number of timers currently registered in the process.
     </p>
    </dd>
   
   
    <dt><code class="literal">round</code></dt>
    <dd>
     <p class="simpara">
      The current round of the timer loop.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 examples" id="refsect1-swoole-timer.stats-examples">
  <h3 class="title">Examples</h3>
  <div class="example" id="example-1">
   <p><strong>Exemplo #1 <span class="function"><strong>Swoole\Timer::stats()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php
$timer_id </span><span style="color: #007700">= </span><span style="color: #0000BB">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">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">Swoole\Timer</span><span style="color: #007700">::</span><span style="color: #0000BB">stats</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>O exemplo acima produzirá
algo semelhante a:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">array(3) {
  [&quot;initialized&quot;]=&gt;
  bool(true)
  [&quot;num&quot;]=&gt;
  int(1)
  [&quot;round&quot;]=&gt;
  int(0)
}</pre>
</div>
   </div>
  </div>
 </div>

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