File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
standard /
tests /
general_functions /
getrusage_basic.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:04 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Test getrusage() function: basic test
--SKIPIF--
<?php
if( substr(PHP_OS, 0, 3) == "WIN" )
die("skip.. Do not run on Windows");
?>
--FILE--
<?php
/* Prototype : array getrusage ([ int $who ] )
* Description: Gets the current resource usages
* Source code: ext/standard/microtime.c
* Alias to functions:
*/
echo "Simple testcase for getrusage() function\n";
$dat = getrusage();
if (!is_array($dat)) {
echo "TEST FAILED : getrusage shoudl return an array\n";
}
// echo the fields which are common to all platforms
echo "User time used (seconds) " . $dat["ru_utime.tv_sec"] . "\n";
echo "User time used (microseconds) " . $dat["ru_utime.tv_usec"] . "\n";
?>
===DONE===
--EXPECTF--
Simple testcase for getrusage() function
User time used (seconds) %d
User time used (microseconds) %d
===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>