private function updateDiffTimestamp()
    {
        $diffTimestamp = 0;
        $lastTimeStamp = 0;
        $lastActivity = 0;
        if (isset($this->data[DeliveryMonitoringService::LAST_PAUSE_TIMESTAMP])) {
            $lastTimeStamp = $this->data[DeliveryMonitoringService::LAST_PAUSE_TIMESTAMP];
        }

        if (isset($this->data[DeliveryMonitoringService::LAST_TEST_TAKER_ACTIVITY])) {
            $lastActivity = $this->data[DeliveryMonitoringService::LAST_TEST_TAKER_ACTIVITY];
        }

        if ($lastTimeStamp - $lastActivity > 0) {
            $diffTimestamp = isset($this->data[DeliveryMonitoringService::DIFF_TIMESTAMP]) ? $this->data[DeliveryMonitoringService::DIFF_TIMESTAMP] : 0;
            $diffTimestamp += $lastTimeStamp - $lastActivity;
        }

        $this->addValue(DeliveryMonitoringService::DIFF_TIMESTAMP, $diffTimestamp, true);
    }
private function updateDiffTimestamp()
    {
        $diffTimestamp = 0;
        $lastTimeStamp = 0;
        $lastActivity = 0;
        if (isset($this->data[DeliveryMonitoringService::LAST_PAUSE_TIMESTAMP])) {
            $lastTimeStamp = $this->data[DeliveryMonitoringService::LAST_PAUSE_TIMESTAMP];
        }

        if (isset($this->data[DeliveryMonitoringService::LAST_TEST_TAKER_ACTIVITY])) {
            $lastActivity = $this->data[DeliveryMonitoringService::LAST_TEST_TAKER_ACTIVITY];
        }

        if ($lastTimeStamp - $lastActivity > 0) {
            $diffTimestamp = isset($this->data[DeliveryMonitoringService::DIFF_TIMESTAMP]) ? $this->data[DeliveryMonitoringService::DIFF_TIMESTAMP] : 0;
            $diffTimestamp += $lastTimeStamp - $lastActivity;
        }

        $this->addValue(DeliveryMonitoringService::DIFF_TIMESTAMP, $diffTimestamp, true);
    }
private function updateDiffTimestamp ( ) { $ diffTimestamp = 0 ; $ lastTimeStamp = 0 ; $ lastActivity = 0 ; if ( isset ( $ this -> data [ DeliveryMonitoringService :: LAST_PAUSE_TIMESTAMP ] ) ) { $ lastTimeStamp = $ this -> data [ DeliveryMonitoringService :: LAST_PAUSE_TIMESTAMP ] ; } if ( isset ( $ this -> data [ DeliveryMonitoringService :: LAST_TEST_TAKER_ACTIVITY ] ) ) { $ lastActivity = $ this -> data [ DeliveryMonitoringService :: LAST_TEST_TAKER_ACTIVITY ] ; } if ( $ lastTimeStamp - $ lastActivity > 0 ) { $ diffTimestamp = isset ( $ this -> data [ DeliveryMonitoringService :: DIFF_TIMESTAMP ] ) ? $ this -> data [ DeliveryMonitoringService :: DIFF_TIMESTAMP ] : 0 ; $ diffTimestamp += $ lastTimeStamp - $ lastActivity ; } $ this -> addValue ( DeliveryMonitoringService :: DIFF_TIMESTAMP , $ diffTimestamp , true ) ; }
Update diff between last_pause_timestamp and last_test_taker_activity
Update diff between last_pause_timestamp and last_test_taker_activity