Checks whether the current robots information has expired and, if necessary, schedules a new <code>robots.txt</code> download.

@param time the current time.
960151
public void checkRobots(final long time) {
		if (! RuntimeConfiguration.FETCH_ROBOTS) return;

		/* Safeguard: if there's no robots filter, and I'm not fetching it, and it's not the first
		 * path in the queue, then something's wrong. */
		if (robotsFilter == null && lastRobotsFetch != Long.MAX_VALUE && (isEmpty() || firstPath() != ROBOTS_PATH)) {
			LOGGER.error("No robots filter and no robots path for " + this);
			lastRobotsFetch = Long.MAX_VALUE; // This inhibits further enqueueing until robots.txt is fetched.
			enqueueRobots();
			return;
		}

		if (lastExceptionClass == null) {
			// If we are not retrying an exception, we check whether it is time to reload robots.txt
			final long robotsExpiration = frontier.rc.robotsExpiration;
			if (time - robotsExpiration >= lastRobotsFetch) {
				if (robotsFilter == null) {
					if (lastRobotsFetch == 0) LOGGER.info("Going to get robots for {} for the first time", Util.toString(schemeAuthority));
					else LOGGER.info("Going to try again to get robots for {}", Util.toString(schemeAuthority));
				}
				else LOGGER.info("Going to get robots for {} because it has expired ({} >= {} ms have passed)", Util.toString(schemeAuthority), Long.valueOf(time - lastRobotsFetch), Long.valueOf(robotsExpiration));
				lastRobotsFetch = Long.MAX_VALUE; // This inhibits further enqueueing until robots.txt is fetched.
				enqueueRobots();
			}
		}
	}
938570
private void syncTime() {
		try {
			Long ovhTime = new ApiOvhAuth(this).time_GET();
			long myTime = System.currentTimeMillis() / 1000L;
			timeOffset = myTime - ovhTime;
		} catch (Exception e) {
			log.error("Failed syncronized Ovh Clock");
			timeOffset = 0L;
		}
	}
893907
public synchronized void checkNotExpired() {
        if (Utils.currentTimeSeconds() > getExpiryTime()) {
            stateMachine.transition(State.EXPIRED);
            disconnectFromChannel();
            throw new IllegalStateException("Channel expired");
        }
    }
700517
public final void updateLastCheckTime(final String id, final long lastCheckTime) {
        final CriteriaBuilder builder = getSession().getCriteriaBuilder();
        final CriteriaUpdate<PrintJobStatusExtImpl> update =
                builder.createCriteriaUpdate(PrintJobStatusExtImpl.class);
        final Root<PrintJobStatusExtImpl> root = update.from(PrintJobStatusExtImpl.class);
        update.where(builder.equal(root.get("referenceId"), id));
        update.set(root.get("lastCheckTime"), lastCheckTime);
        getSession().createQuery(update).executeUpdate();
    }
882286
public function isExpired($key, $time)
    {
        return $this->getCreatedTime($key) + $this->getTtl($key) < $time;
    }
125853
public function setRevisionDate(?int $time = null): void
    {
        $this->setHeader('PO-Revision-Date', $this->formatTimestamp($time));
    }
227987
public void time(Runnable event) {
        long startTime = this.clock.getTick();
        try {
            event.run();
        } finally {
            update(this.clock.getTick() - startTime);
        }
    }
271257
public function isExpired($time = null)
    {
        $time = ((null === $time) ? time() : $time);
        return (($this->_options['expire'] - $time) > 0);
    }
164913
@Override
  public void make()
  {
    synchronized (this) {
      if (CurrentTime.currentTime() < _lastMakeTime + 2000)
        return;

      try {
        makeImpl();
      } catch (Exception e) {
        log.log(Level.FINER, e.toString(), e);
      }

      _lastMakeTime = CurrentTime.currentTime();
    }
  }
1334475
@Override
    public synchronized void updateLastAccessTime(long accessTime) {
        if (_lastAccessedTime == 0) { // newly created session object
            _lastAccessedTime = accessTime;
        } else {
            _lastAccessedTime = _currentAccessTime;
        }
        _currentAccessTime = accessTime;
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_CORE.logp(Level.FINE, methodClassName, methodNames[UPDATE_LAST_ACCESS_TIME], "" + accessTime);
        }
    }
630264
def handle_expired_task(exception)
      exception.run_time = Time.now.in_time_zone(@task.time_zone)
      exception.scheduled_time = @scheduled_time
      exception.task = @task

      SimpleScheduler.expired_task_blocks.each do |block|
        block.call(exception)
      end
    end
1275851
public synchronized Date setEndDate(Date time)
    {
        m_cachedInfo.setEndDate(time);
        int iThisIndex = m_model.indexOf(this);
        if (iThisIndex != -1)
            m_model.fireTableRowsUpdated(iThisIndex, iThisIndex);
        this.changeRemoteDate(null, null, this, null, time);
        return this.getEndDate();
    }
1020106
public function isFresh($url, $time)
    {
        if($file = $this->locate($url)) {
            return (bool) filemtime($file) < $time;
        }

        return false;
    }
607822
public void expire(long time) {
    long calculatedSize = 0;
    Iterator<Bar> it = bars.iterator();
    while (it.hasNext()) {
      long barSize = it.next().expire(time);
      if (barSize == 0) {
        it.remove();
      }
      calculatedSize += barSize;
    }
    this.size = calculatedSize;
    if (bars.isEmpty()) {
      bars.add(new Bar(barEpsilon, window));
    }
  }
474666
public void setExpirationTime(long expirationTime) {
    if (expirationTime == NO_EXPIRE) {
      updateExpirationTime(NO_EXPIRE);
    } else if (expirationTime < 0) {
      throw new IllegalArgumentException("invalid expiration time: " + expirationTime);
    } else {
      updateExpirationTime(expirationTime);
    }
  }
624580
public static boolean isToday(Date time) {
        String now = getFormatDate(SHORT);
        String target = getFormatDate(SHORT, time);
        return now.equals(target);
    }
1121738
public void addExecutionTime(long time) {
		totalTime.increaseByLong(time);
		lastRequest.setValueAsLong(time);
		minTime.setValueIfLesserThanCurrentAsLong(time);
		maxTime.setValueIfGreaterThanCurrentAsLong(time);

	}