X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FProfilerSimple.php;h=8aab1ecc32c443bbac152684dc95cdf4708fd795;hb=c53ccc605f1128eefebda9378116fd18223b1ec2;hp=5989061dcdba7ede9d03b443842bf8f6ca5e452c;hpb=b8b254da7fc478209dbf1d6bd9e5ee1e317ab435;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ProfilerSimple.php b/includes/ProfilerSimple.php index 5989061dcd..8aab1ecc32 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); }