diff --git a/core/ormstopwatch.class.inc.php b/core/ormstopwatch.class.inc.php index e0e849b3b..eb74f4dc5 100644 --- a/core/ormstopwatch.class.inc.php +++ b/core/ormstopwatch.class.inc.php @@ -258,16 +258,21 @@ class ormStopWatch public function Reset($oObject, $oAttDef) { $this->iTimeSpent = 0; - $this->iStarted = null; - $this->iLastStart = null; $this->iStopped = null; foreach ($this->aThresholds as $iPercent => &$aThresholdData) { $aThresholdData['triggered'] = false; - $aThresholdData['deadline'] = null; $aThresholdData['overrun'] = null; } + + if (!is_null($this->iLastStart)) + { + // Currently running... starting again from now! + $this->iStarted = time(); + $this->iLastStart = time(); + $this->ComputeDeadlines($oObject, $oAttDef); + } } /**