|
|
@@ -29,6 +29,22 @@ class DebugExecutionTime {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public function getLastExecTime() {
|
|
|
+ if (!$this->_isActive) return null;
|
|
|
+ $logTotal = count($this->_log);
|
|
|
+ if ($logTotal < 2) return null;
|
|
|
+ return $this->_log[$logTotal - 1][1];
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getTotalExecTime() {
|
|
|
+ if (!$this->_isActive) return null;
|
|
|
+ $logTotal = count($this->_log);
|
|
|
+ if ($logTotal < 2) return null;
|
|
|
+ $sumExecTime = 0;
|
|
|
+ foreach ($this->_log as $log) $sumExecTime += $log[1];
|
|
|
+ return $sumExecTime;
|
|
|
+ }
|
|
|
+
|
|
|
public function printDebug() {
|
|
|
if (!$this->_isActive) return;
|
|
|
$sumExecTime = 0;
|