blob: 7aaacd51a053f6f252ca62521fbc22f047bd61c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
--TEST--
Test getrusage() function: basic test
--SKIPIF--
<?php if (!function_exists("getrusage")) print "skip"; ?>
--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 should 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";
?>
--EXPECTF--
Simple testcase for getrusage() function
User time used (seconds) %d
User time used (microseconds) %d
|