mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
Advanced customization: a stop watch can be started in the past (incident ticket created from an alarm)
SVN:trunk[3478]
This commit is contained in:
@@ -330,7 +330,7 @@ class ormStopWatch
|
||||
* It is the responsibility of the caller to compute the deadlines
|
||||
* (to avoid computing twice for the same result)
|
||||
*/
|
||||
public function Start($oObject, $oAttDef)
|
||||
public function Start($oObject, $oAttDef, $iNow = null)
|
||||
{
|
||||
if (!is_null($this->iLastStart))
|
||||
{
|
||||
@@ -338,11 +338,16 @@ class ormStopWatch
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_null($iNow))
|
||||
{
|
||||
$iNow = time();
|
||||
}
|
||||
|
||||
if (is_null($this->iStarted))
|
||||
{
|
||||
$this->iStarted = time();
|
||||
$this->iStarted = $iNow;
|
||||
}
|
||||
$this->iLastStart = time();
|
||||
$this->iLastStart = $iNow;
|
||||
$this->iStopped = null;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user