<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.posix.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'function.posix-times.php',
    1 => 'posix_times',
    2 => 'Obtener los tiempos de procesos',
  ),
  'up' => 
  array (
    0 => 'ref.posix.php',
    1 => 'Funciones POSIX',
  ),
  'prev' => 
  array (
    0 => 'function.posix-sysconf.php',
    1 => 'posix_sysconf',
  ),
  'next' => 
  array (
    0 => 'function.posix-ttyname.php',
    1 => 'posix_ttyname',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/posix/functions/posix-times.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.posix-times" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">posix_times</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">posix_times</span> &mdash; <span class="dc-title">Obtener los tiempos de procesos</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.posix-times-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>posix_times</strong></span>(): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Obtiene informaciónsobre el uso actual de CPU.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.posix-times-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">Esta función no contiene ningún parámetro.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.posix-times-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   Devuelve un hash de cadenas con iformación sobre el uso de
   CPU del proceso actual. Los índices del hash son:
   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      ticks - el número de pulsos de reloj que han trasncurrido desde
      el reinicio.
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      utime - tiempo de usuario usado por el proceso actual.
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      stime - tiempo de sistema usado por el proceso actual.
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      cutime - tiempop de usuario usado por el proceso actual y sus hijos.
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      cstime - tiempo de sistema usado por el proceso actual y sus hijos.
     </span>
    </li>
   </ul>
   La función devuelve <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> en caso de fallo.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.posix-times-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Ejemplo de uso de <span class="function"><strong>posix_times()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />$tiempos </span><span style="color: #007700">= </span><span style="color: #0000BB">posix_times</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$tiempos </span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Resultado del ejemplo anterior es similar a:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Array
(
    [ticks] =&gt; 25814410
    [utime] =&gt; 1
    [stime] =&gt; 1
    [cutime] =&gt; 0
    [cstime] =&gt; 0
)</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.posix-times-notes">
  <h3 class="title">Notas</h3>
  <div class="warning"><strong class="warning">Advertencia</strong>
   <p class="para">
    Esta función no es fiable de usar, puede devolver valores negativos para
    tiempos altos.
   </p>
  </div>
 </div>


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