Update extra time allowed for the delivery execution
557374
private function updateExtraTime()
    {
        $testSession = $this->getTestSession();
        if ($testSession instanceof TestSession) {
            $timer = $testSession->getTimer();
            $timerTarget = $testSession->getTimerTarget();
        } else {
            $timerTarget = TimePoint::TARGET_SERVER;
            $qtiTimerFactory = $this->getServiceLocator()->get(QtiTimerFactory::SERVICE_ID);
            $timer = $qtiTimerFactory->getTimer($this->deliveryExecution->getIdentifier(), $this->deliveryExecution->getUserIdentifier());
        }

        $deliveryExecutionManager = $this->getServiceLocator()->get(DeliveryExecutionManagerService::SERVICE_ID);
        $maxTimeSeconds = $deliveryExecutionManager->getTimeLimits($testSession);

        $data = $this->get();
        $oldConsumedExtraTime = isset($data[DeliveryMonitoringService::CONSUMED_EXTRA_TIME]) ? $data[DeliveryMonitoringService::CONSUMED_EXTRA_TIME] : 0;
        $consumedExtraTime = max($oldConsumedExtraTime, $timer->getConsumedExtraTime(null, $maxTimeSeconds, $timerTarget));

        $this->addValue(DeliveryMonitoringService::EXTRA_TIME, $timer->getExtraTime($maxTimeSeconds), true);
        $this->addValue(DeliveryMonitoringService::CONSUMED_EXTRA_TIME, $consumedExtraTime, true);
    }
1272778
public void updateArrivalTime(long messageArrivalTime)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "updateMessageArrivalTime", messageArrivalTime);
      this.arrivalTime = messageArrivalTime;
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "updateMessageArrivalTime");
   }
982312
private boolean setUpdated(Date lastUpdateTime) {
        // Because there is no gaurantee of order of delivery,
        // we want to ensure that we do not set the updated time if it was
        // earlier than the current updated time
        if (updated == null || updated.compareTo(lastUpdateTime) < 0) {
            updated = lastUpdateTime;
            return true;
        }
        return false;
    }
1119251
private void deliver() {
    // We can have reentrancy here when using a direct executor, triggered by calls to
    // request more messages. This is safe as we simply loop until pendingDelivers = 0
    if (inDelivery) {
      return;
    }
    inDelivery = true;
    try {
      // Process the uncompressed bytes.
      while (!stopDelivery && pendingDeliveries > 0 && readRequiredBytes()) {
        switch (state) {
          case HEADER:
            processHeader();
            break;
          case BODY:
            // Read the body and deliver the message.
            processBody();

            // Since we've delivered a message, decrement the number of pending
            // deliveries remaining.
            pendingDeliveries--;
            break;
          default:
            throw new AssertionError("Invalid state: " + state);
        }
      }

      if (stopDelivery) {
        close();
        return;
      }

      /*
       * We are stalled when there are no more bytes to process. This allows delivering errors as
       * soon as the buffered input has been consumed, independent of whether the application
       * has requested another message.  At this point in the function, either all frames have been
       * delivered, or unprocessed is empty.  If there is a partial message, it will be inside next
       * frame and not in unprocessed.  If there is extra data but no pending deliveries, it will
       * be in unprocessed.
       */
      if (closeWhenComplete && isStalled()) {
        close();
      }
    } finally {
      inDelivery = false;
    }
  }
133364
function update(start, success, result) {
        const c = ctx.ctx;
        if (start) {
            npm.utils.addReadProp(c, 'start', new Date());
        } else {
            c.finish = new Date();
            c.success = success;
            c.result = result;
            c.duration = c.finish - c.start;
            npm.utils.lock(c, true);
        }
        (isTX ? npm.events.transact : npm.events.task)(ctx.options, {
            client: ctx.db && ctx.db.client, // loss of connectivity is possible at this point
            dc: ctx.dc,
            ctx: c
        });
    }
1302831
public void waitForUpdate() {

        CmsWaitHandle handle = new CmsWaitHandle(true);
        addWaitHandle(handle);
        handle.enter(Long.MAX_VALUE);
    }
758461
public void update(Date lastScheduledExecutionTime, Date lastActualExecutionTime, Date lastCompletionTime) {
        this.lastScheduledExecutionTime = lastScheduledExecutionTime;
        this.lastActualExecutionTime = lastActualExecutionTime;
        this.lastCompletionTime = lastCompletionTime;
    }
324264
def update_time(network_id)
      @serial.transmit(UpdateTimeRequest.new(:network_id => network_id))
      UpdateTimeAckResponse.read(@serial.receive(6))
      UpdateTimeResponse.read(@serial.receive(8))
    end
78090
def before_after_send_handling(self):
        
        self._init_delivery_statuses_dict()
        self.before_send()

        try:
            yield

        finally:
            self.after_send()
            self._update_dispatches()
408476
@Override
    public void setDeliveryDelay(long deliveryDelayTime) throws JMSException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setDeliveryDelay", deliveryDelayTime);

        checkClosed();
        // Throws an exception if this is not a valid time to live.
        validateDeliveryDelayTime(deliveryDelayTime);
        // We know by this point that it must be valid.
        this.defaultDeliveryDelay = deliveryDelayTime;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setDeliveryDelay");

    }
134333
def on_put(self, req, resp, **kwargs):
        """"""
        validated = self.require_validated(req)
        return super().on_put(
            req, resp,
            handler=partial(self._update, validated=validated),
            **kwargs
        )
1078472
def add_time(self, extra_time):
        """"""
        window_start = self.parent.value('window_start') + extra_time
        self.parent.overview.update_position(window_start)
854370
protected function timestampUpdate()
    {
        $this->updated = date('Y-m-d H:i:s');
        $this->id || $this->created = $this->updated;
    }
1087207
@SuppressWarnings("ResultOfMethodCallIgnored") private void updateSuccess(
      DownloadRequest request) {
    updateState(request, DownloadState.SUCCESSFUL);

    /* notify the request download finish */
    request.finish();

    File file = new File(request.tempFilePath());
    if (file.exists()) {
      file.renameTo(new File(request.destinationFilePath()));
    }

    /* deliver success message */
    delivery.postSuccess(request);
  }
332689
@Override
    public void update(IEntityLock lock, Date newExpiration, Integer newLockType)
            throws LockingException {
        Connection conn = null;
        try {
            conn = RDBMServices.getConnection();
            if (newLockType != null) {
                primDeleteExpired(new Date(), lock.getEntityType(), lock.getEntityKey(), conn);
            }
            primUpdate(lock, newExpiration, newLockType, conn);
        } catch (SQLException sqle) {
            throw new LockingException("Problem updating " + lock, sqle);
        } finally {
            RDBMServices.releaseConnection(conn);
        }
    }
444465
public void updateLastTimeSMPPLinkUpdated() {
		lastTimeSMPPLinkUpdated = System.currentTimeMillis();
		if(logger.isDebugEnabled())
			logger.debug("Updated Last Client " + channel.getRemoteAddress().toString() + " Enquire Link time update " + lastTimeSMPPLinkUpdated);
	}
267220
def run(self):
        
        if self.update_time_value():
            self.i3status.py3_wrapper.notify_update(self.module_name)
        due_time = self.py3.time_in(sync_to=self.time_delta)

        self.i3status.py3_wrapper.timeout_queue_add(self, due_time)