From 89032f8a2ad7e5a24933442f17df9ecf93f821f5 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 8 Aug 2011 08:37:55 -0500 Subject: [PATCH] Refactoring the Benchmark class. --- system/benchmark.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system/benchmark.php b/system/benchmark.php index 4ac83130..c0d71eb2 100644 --- a/system/benchmark.php +++ b/system/benchmark.php @@ -28,7 +28,12 @@ public static function start($name) */ public static function check($name) { - return (array_key_exists($name, static::$marks)) ? number_format((microtime(true) - static::$marks[$name]) * 1000, 2) : 0.0; + if (array_key_exists($name, static::$marks)) + { + return number_format((microtime(true) - static::$marks[$name]) * 1000, 2); + } + + return 0.0; } /**