diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
commit | 9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch) | |
tree | 46d1a0dee7febef5c2d57a9f7b972be16a163b3d /includes/ProfilerSimple.php | |
parent | 78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff) |
update to MediaWiki 1.17.0
Diffstat (limited to 'includes/ProfilerSimple.php')
-rw-r--r-- | includes/ProfilerSimple.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/ProfilerSimple.php b/includes/ProfilerSimple.php index 5989061d..8aab1ecc 100644 --- a/includes/ProfilerSimple.php +++ b/includes/ProfilerSimple.php @@ -109,8 +109,9 @@ class ProfilerSimple extends Profiler { function getCpuTime($ru=null) { if ( function_exists( 'getrusage' ) ) { - if ( $ru == null ) + if ( $ru == null ) { $ru = getrusage(); + } return ($ru['ru_utime.tv_sec'] + $ru['ru_stime.tv_sec'] + ($ru['ru_utime.tv_usec'] + $ru['ru_stime.tv_usec']) * 1e-6); } else { @@ -120,8 +121,9 @@ class ProfilerSimple extends Profiler { /* If argument is passed, it assumes that it is dual-format time string, returns proper float time value */ function getTime($time=null) { - if ($time==null) + if ($time==null) { return microtime(true); + } list($a,$b)=explode(" ",$time); return (float)($a+$b); } |