Indicated if token will expire after N seconds.
@param seconds Number of seconds
510528
public boolean isExpired(int seconds) {
        long diff = localIssuedAt.getTime() - issuedAt.getTime();
        long localExpiresAtTime = expiresAt.getTime() + diff;
        return (new Date().getTime() - seconds * 1000) >= localExpiresAtTime;
    }
1310877
private static long getNextRefresh(long tokenValiditySec) {
		long interval = Config.JWT_REFRESH_INTERVAL_SEC;
		// estimate when the next token refresh should be
		// usually every hour, or halfway until the time it expires
		if (tokenValiditySec < (2 * interval)) {
			interval = (tokenValiditySec / 2);
		}
		return System.currentTimeMillis() + (interval * 1000);
	}
1153990
@Override
    public boolean setTransactionTimeout(final int _seconds)
    {
        if (VFSStoreResource.LOG.isDebugEnabled()) {
            VFSStoreResource.LOG.debug("setTransactionTimeout (seconds = " + _seconds + ")");
        }
        return true;
    }
361083
public Long expire(Object key, int seconds) {
		Jedis jedis = getJedis();
		try {
			return jedis.expire(keyToBytes(key), seconds);
		}
		finally {close(jedis);}
	}
204259
public void alertPresent(double seconds) {
        try {
            double timeTook = popup(seconds);
            checkAlertPresent(seconds, timeTook);
        } catch (TimeoutException e) {
            checkAlertPresent(seconds, seconds);
        }
    }
903867
@Override
	public void setTransactionTimeout(int seconds) throws TransactionManagementException {
		logger.entering(CLASSNAME, "setTransactionTimeout", seconds);
		try {
			userTran.setTransactionTimeout(seconds);
		} catch (SystemException e) {
			throw new TransactionManagementException(e);
		}
		logger.exiting(CLASSNAME, "setTransactionTimeout");
	}
792011
function(){
    if (!service.token) {
      return;
    }
    if(typeof(service.token.expires_in) !== 'undefined' && service.token.expires_in !== null) {
      var expires_at = new Date();
      expires_at.setSeconds(expires_at.getSeconds() + parseInt(service.token.expires_in)-60); // 60 seconds less to secure browser and response latency
      service.token.expires_at = expires_at;
    }
    else {
      service.token.expires_at = null;
    }
  }
1166280
public boolean hasExpired()
    {
        if ( expiresAt == null ) {
            LOGGER.debug( "hasExpired - token is not expirable" );
            return false;
        }

        long now = System.currentTimeMillis();
        if ( LOGGER.isDebugEnabled() ) {
            LOGGER.debug( "hasExpired? - now: {} expiredAt: {} ", new Date( now ), expiresAt );
        }
        return now > expiresAt.getTime();
    }
1258075
@BackendProperty
    public void setQueryTimeout(Integer seconds) {
        if (seconds != null && seconds.intValue() < 0) {
            throw new IllegalArgumentException("invalid seconds: " + seconds);
        }
        this.queryTimeout = seconds;
    }
719959
public void alertNotPresent(double seconds) {
        try {
            double timeTook = noPopup(seconds);
            checkAlertNotPresent(seconds, timeTook);
        } catch (TimeoutException e) {
            checkAlertNotPresent(seconds, seconds);
        }
    }
516248
private void expireSessions(long timestamp) {
    // Iterate through registered sessions.
    for (RaftSession session : sessions.getSessions(primitiveId)) {
      if (session.isTimedOut(timestamp)) {
        log.debug("Session expired in {} milliseconds: {}", timestamp - session.getLastUpdated(), session);
        session = sessions.removeSession(session.sessionId());
        if (session != null) {
          session.expire();
          service.expire(session.sessionId());
        }
      }
    }
  }
7413
public function expire($key, $seconds, $cb = null)
    {
        $this->redis->expire($this->config->redisprefix->value . $key, $seconds, $cb);
    }
575768
def duration_expired(start_time, duration_seconds):
    

    if duration_seconds is not None:
        delta_seconds = datetime_delta_to_seconds(dt.datetime.now() - start_time)

        if delta_seconds >= duration_seconds:
            return True

    return False
358119
public function setExpire(int $seconds): bool
    {
        return $this->handle->expire($this->name, $seconds);
    }
93590
def lock(self, seconds=5):
        
        self._current_application().lock(robot.utils.timestr_to_secs(seconds))
488721
@Override
    public boolean setTransactionTimeout(final int _seconds)
    {
        if (JDBCStoreResource.LOG.isDebugEnabled()) {
            JDBCStoreResource.LOG.debug("setTransactionTimeout (seconds = " + _seconds + ")");
        }
        return true;
    }
650983
def ttl_for_access_token=(seconds)
      raise_if_authentication_failed!

      key = @key_for_access_token
      value = @value_for_access_token
      ApiWarden.redis { |conn| conn.set(key, value, ex: seconds) }
    end