Fiktiv_Performance: refactoring
This commit is contained in:
parent
e44bdc275d
commit
7a59c5b8c5
1 changed files with 18 additions and 3 deletions
|
|
@ -2,21 +2,36 @@
|
|||
|
||||
class Fiktiv_Performance
|
||||
{
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
protected static $_start = null;
|
||||
protected static $_end = null;
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
protected static $_end = null;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public static function begin()
|
||||
{
|
||||
self::$_start = microtime(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return float
|
||||
*/
|
||||
public static function end()
|
||||
{
|
||||
self::$_end = microtime(true);
|
||||
return self::$_end - self::$_start;
|
||||
return self::results();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return float
|
||||
*/
|
||||
public static function results()
|
||||
{
|
||||
return self::$_end - self::$_start;
|
||||
|
|
|
|||
Reference in a new issue