Check if this session is expired.
@param expiration the expiration in seconds
@return {@code true} if this session is expired
426001
public boolean expired(int expiration) {
        if (null == cliContext) {
            return true;
        }
        if ((daemon || cliContext.inProgress()) && !cliContext.disconnected()) {
            return false;
        }
        long l = expiration * 1000;
        return l < ($.ms() - ts);
    }
621983
@JsonIgnore
    protected boolean isRefreshTokenExpired(final TicketState ticketState) {
        if (ticketState == null) {
            return true;
        }
        val expiringTime = ticketState.getCreationTime().plus(this.timeToKillInSeconds, ChronoUnit.SECONDS);
        return expiringTime.isBefore(ZonedDateTime.now(ZoneOffset.UTC));
    }
946497
def hasExpired(self):
        
        return (datetime.datetime.utcnow() - self.lastUpdateTime).total_seconds() > self.maxAgeSeconds
895676
public boolean isIdleExpire()
  {
    if (! _lifecycle.isActive())
      return true;
    
    long now = currentTimeActual();
    
    long idleExpire = _threadIdleExpireTime.get();
    
    int idleCount = _idleCount.get();

    // if idle queue is full and the expire is set, return and exit
    if (_idleMin < idleCount) {
      long nextIdleExpire = now + _idleTimeout;

      if (_idleMax < idleCount 
          && _idleMin < _idleMax) {
        /*
          && _threadIdleExpireTime.compareAndSet(idleExpire, nextIdleExpire)) {
          */
        _threadIdleExpireTime.compareAndSet(idleExpire, nextIdleExpire);
        
        return true;
      }
      else if (idleExpire < now
               && _threadIdleExpireTime.compareAndSet(idleExpire,
                                                      nextIdleExpire)) {
        return true;
      }
    }
    
    return false;
  }
46297
@Override
  public boolean hasExpired(SlotInfo<? extends T> info) throws Exception {
    return firstExpiration.hasExpired(info)
            || secondExpiration.hasExpired(info);
  }
561157
private boolean isExpired(CacheEntry entry) {
        if (ttl == 0) {
            return false;
        }

        return entry.getTimestamp() + ttl < System.currentTimeMillis();
    }
577592
public boolean refreshSession (String sessionKey, int expireDays)
        throws PersistenceException
    {
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.DATE, expireDays);
        Date expires = new Date(cal.getTime().getTime());

        // attempt to update an existing session row, returning true if we found and updated it
        return (update("update sessions set expires = '" + expires + "' " +
                       "where authcode = " + JDBCUtil.escape(sessionKey)) == 1);
    }
824669
def update_or_expire_session(self):
        
        if not hasattr(self, 'key'):
            return
        now = time.time()
        timestamp = float(self.get() or 0) or now
        sess_id = self.sess_id or UserSessionID(self.user_id).get()
        if sess_id and now - timestamp > self.SESSION_EXPIRE_TIME:
            Session(sess_id).delete()
            return False
        else:
            self.set(now)
            return True
947662
private static boolean expiring(Date expiry) {
        long timeRemaining = expiry.getTime() - System.currentTimeMillis();
        return timeRemaining < EXPIRY_TIME_MILLIS;
    }
738559
def expired(self):
        
        if self.timeout is None:
            return False

        return monotonic() - self.start_time > self.timeout
344382
public boolean isExpired()
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "isExpired");
        boolean expired = false;
        long curTime = System.currentTimeMillis();
        //TODO:
        if (curTime - _leaseTime > _leaseTimeout * 1000) //  30 seconds default for timeout
        {
            if (tc.isDebugEnabled())
                Tr.debug(tc, "Lease has EXPIRED for " + _recoveryIdentity + ", currenttime: " + curTime + ", storedTime: " + _leaseTime);
            expired = true;
        }
        else
        {
            if (tc.isDebugEnabled())
                Tr.debug(tc, "Lease has not expired for " + _recoveryIdentity + ", currenttime: " + curTime + ", storedTime: " + _leaseTime);
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "isExpired", expired);
        return expired;
    }
962598
@Override
    public final void expirerStop()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "expirerStop");

        _expirer.stop();

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "expirerStop");
    }
1260551
def _has_expired(self):
        
        expired = False
        if hasattr(self, 'Expiration'):
            now = datetime.datetime.utcnow()
            expiration = datetime.datetime.strptime(self.Expiration, '%Y-%m-%dT%H:%M:%SZ')
            expired = (now >= expiration)
        else:
            raise ValueError("ERROR: Request for expired property, but no Expiration in HIT!")
        return expired
613893
async def is_expired(self):
        
        if asyncio.iscoroutinefunction(self.state):
            current_state = await self.state()
        else:
            current_state = self.state()
        if current_state:
            return current_state != "leased"
        return False
210170
public static boolean isExpired(TemporalAt entity) {
    Date now = new Date();
    if (null == entity.getBeginAt()) return true;
    return entity.getBeginAt().after(now) || (null != entity.getEndAt() && !now.before(entity.getEndAt()));
  }
1236341
protected Boolean getIgnoreExpirationDate() {

        Boolean isIgnoreExpirationDate = parseOptionalBooleanValue(m_configObject, JSON_KEY_IGNORE_EXPIRATION_DATE);
        return (null == isIgnoreExpirationDate) && (m_baseConfig != null)
        ? Boolean.valueOf(m_baseConfig.getGeneralConfig().getIgnoreExpirationDate())
        : isIgnoreExpirationDate;
    }
1318812
public boolean expire(boolean cancelTimer)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "expire", new Boolean(cancelTimer));

    if ((expiryHandle != null) && cancelTimer)
    {
      expiryHandle.cancel();
    }
    expiryHandle = null;
    if (!satisfied)
    {
      expired = true;
      if (TraceComponent.isAnyTracingEnabled() && UserTrace.tc_mt.isDebugEnabled())    
        SibTr.debug(UserTrace.tc_mt,       
           nls_mt.getFormattedMessage(
           "REMOTE_REQUEST_EXPIRED_CWSJU0033",
           new Object[] {
             tick},
           null));
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "expire", new Boolean(expired));

    return expired;
  }