array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.posix-times.php', 1 => 'posix_times', ), 'up' => array ( 0 => 'ref.posix.php', 1 => 'POSIX İşlevleri', ), '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' => 'tr', 'path' => 'reference/posix/functions/posix-times.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
posix_times — Süreçle ilgili işlemci zamanlarını döndürür
Bu işlevin bağımsız değişkeni yoktur.
O an ki işlemci kullanımı hakkındaki bilgileri indisli bir dizge olarak döndürür. İndisler şunlardır:
ticks
- sistem açıldığından beri sayılan saat
tiklerinin sayısı.
utime
- geçerli süreç tarafından harcanan kullanıcı
zamanı.
stime
- geçerli süreç tarafından harcanan sistem
zamanı.
cutime
- geçerli süreç ve çocukları tarafından
harcanan kullanıcı zamanı.
cstime
- geçerli süreç ve çocukları tarafından
harcanan sistem zamanı.
false
döndürür.
Örnek 1 - posix_times() örneği
<?php
$times = posix_times();
print_r($times);
?>
Yukarıdaki örnek şuna benzer bir çıktı üretir:
Array ( [ticks] => 25814410 [utime] => 1 [stime] => 1 [cutime] => 0 [cstime] => 0 )
Bu işlev, büyük süreler için negatif değerler döndürebileceğinden güvenilir değildir.