1--TEST--
2Test getrusage() function: basic test
3--SKIPIF--
4<?php
5if( substr(PHP_OS, 0, 3) == "WIN" )
6  die("skip.. Do not run on Windows");
7?>
8--FILE--
9<?php
10/* Prototype  :  array getrusage  ([ int $who  ] )
11 * Description: Gets the current resource usages
12 * Source code: ext/standard/microtime.c
13 * Alias to functions:
14 */
15
16echo "Simple testcase for getrusage() function\n";
17
18$dat = getrusage();
19
20if (!is_array($dat)) {
21	echo "TEST FAILED : getrusage shoudl return an array\n";
22}
23
24// echo the fields which are common to all platforms
25echo "User time used (seconds) " . $dat["ru_utime.tv_sec"] . "\n";
26echo "User time used (microseconds) " . $dat["ru_utime.tv_usec"] . "\n";
27?>
28===DONE===
29--EXPECTF--
30Simple testcase for getrusage() function
31User time used (seconds) %d
32User time used (microseconds) %d
33===DONE===
34