_timer = new Zeed_Util_Timer(false);
$this->_timeStart = microtime();
$head = '
';
/*
* 初始化时先把头部压入栈中
*/
array_push($this->_content, $head);
}
/**
* 克隆解释器
*/
private function __clone() {
}
protected function output($str) {
$this->_message .= $str;
}
/**
* 获取注册表实例对象
*
*
* $__instance = getInstance();
*
*
* @return object core_registry
*/
public static function getInstance() {
if (null === self::$_instance) {
self::$_instance = new self();
}
return self::$_instance;
}
public function start($message = '') {
// $colors = array('#E54646','#EE7C6B','#F5A89A','#FCDAD5');
// static $i = 150, $j = 0, $k = 0;
// $i += 10;
// $j += 1;
// $k += 30;
/*
* 消息开始时把消息头压入栈中
*/
array_push($this->_content,
$this->_prevMessages .
'
Time Before: " . number_format($time_before, 5) . " seconds
");
$this->output("Time After: " . number_format($time_after, 5) . " seconds
");
$this->output("Time Taken: " . number_format($time_taken, 5) . " seconds
Memory Before: " . number_format($memory_before / 1024, 3) . " KB
");
$this->output("Memory After: " . number_format($memory_after / 1024, 3) . " KB
");
$this->output("Memory Used: " . number_format(($memory_after - $memory_before) / 1024, 3) . " KB