Archived
1
0
Fork 0

Fiktiv_Performance: refactoring

This commit is contained in:
H Hautakoski 2010-09-15 19:06:54 +02:00
parent e44bdc275d
commit 7a59c5b8c5

View file

@ -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;