Refactoring the Benchmark class.

This commit is contained in:
Taylor Otwell 2011-08-08 08:37:55 -05:00
parent 24ba87f5de
commit 89032f8a2a
1 changed files with 6 additions and 1 deletions

View File

@ -28,7 +28,12 @@ public static function start($name)
*/ */
public static function check($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;
} }
/** /**