Indicates if connection has expired.
481818
def is_expired(self):
        
        if time.time() - self.last_ping > HB_PING_TIME:
            self.ping()

        return (time.time() - self.last_pong) > HB_PING_TIME + HB_PONG_TIME
649585
def on_expired(self):
        """"""

        print('Authentication expired')

        # Authentication expired
        self.is_authenticating.acquire()
        self.is_authenticating.notify_all()
        self.is_authenticating.release()
964540
def _check_connection(self):
        
        # check if connection is expired
        reset = False
        if self._force_recon:
            self.logger.warning(
                "[%s:%s] Error communicating with socket, resetting "
                "connection",
                self.fn or self.host, self.port)
            reset = True

        elif self.heartbeat_controller.is_expired():
            self.logger.warning(
                "[%s:%s] Heartbeat timeout, resetting connection",
                self.fn or self.host, self.port)
            reset = True

        if reset:
            for channel in self._open_channels:
                self.disconnect_channel(channel)
            self._report_connection_status(
                ConnectionStatus(CONNECTION_STATUS_LOST,
                                 NetworkAddress(self.host, self.port)))
            try:
                self.initialize_connection()
            except ChromecastConnectionError:
                self.stop.set()
            return False
        return True
225711
def is_timed_out(self):
        
        if (self.is_expired):
            return True

        try:
            if (not self.last_access_time):
                msg = ("session.last_access_time for session with id [" +
                       str(self.session_id) + "] is null. This value must be"
                       "set at least once, preferably at least upon "
                       "instantiation. Please check the " +
                       self.__class__.__name__ +
                       " implementation and ensure self value will be set "
                       "(perhaps in the constructor?)")
                raise ValueError(msg)

            """
             Calculate at what time a session would have been last accessed
             for it to be expired at this point.  In other words, subtract
             from the current time the amount of time that a session can
             be inactive before expiring.  If the session was last accessed
             before this time, it is expired.
            """
            if self.is_absolute_timed_out:
                return True

            if self.is_idle_timed_out:
                return True

        except AttributeError:
            msg2 = ("Timeouts not set for session with id [" +
                    str(self.session_id) + "]. Session is not considered "
                    "expired.")
            logger.debug(msg2)

        return False
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;
  }
132768
def _check_connections(self):
        """"""

        for server in self._servers:
            if self._is_reachable(server):
                server['down_until'] = 0
            else:
                server['down_until'] = time.time() + 5
713471
def expired(self):
    """"""
    expiry_time = self.expiry_time
    if expiry_time is not None:
      return expiry_time < rdfvalue.RDFDatetime.Now()
    else:
      return False
286761
def query_by_expired(cls):
        """"""
        lifetime = current_app.permanent_session_lifetime
        expired_moment = datetime.utcnow() - lifetime
        return cls.query.filter(cls.created < expired_moment)
285519
private void timeoutExpired(final Timeout timeout, final TimeoutContext context) {
        try {
            removeExpiredTimeout(timeout);

            for (TimeoutExpired callback : callbacks) {
                if (callback instanceof TimeoutExpirationCallback) {
                    ((TimeoutExpirationCallback) callback).expired(timeout, context);
                } else {
                    callback.expired(timeout);
                }
            }
        } catch (Exception ex) {
            // catch all exceptions. otherwise calling timeout thread of timers thread pool will be terminated.
            LOG.error("Error handling timeout.", ex);
        }
    }
1085250
private boolean isCertExpired(X509Certificate cert) {
		if (cert != null && cert.getNotAfter().before(new Date())) {
			return true;
		}
		return false;
	}
1089678
protected boolean isExpired(OAuthProviderTokenImpl authToken) {
    if (authToken.isAccessToken()) {
      if ((authToken.getTimestamp() + (getAccessTokenValiditySeconds() * 1000L)) < System.currentTimeMillis()) {
        return true;
      }
    }
    else {
      if ((authToken.getTimestamp() + (getRequestTokenValiditySeconds() * 1000L)) < System.currentTimeMillis()) {
        return true;
      }
    }

    return false;
  }
276709
public function isExpired()
    {
        if ($this->getExpiresAt() instanceof \DateTime) {
            return $this->getExpiresAt()->getTimestamp() < time();
        }

        if ($this->isAppAccessToken()) {
            return false;
        }

        return null;
    }
1281336
def expireat(self, key, when):
        """"""
        expire_time = datetime.fromtimestamp(when)
        key = self._encode(key)
        if key in self.redis:
            self.timeouts[key] = expire_time
            return True
        return False
919836
private void warnRooCaCertExpired() {
		X509Certificate cert = getRootCaCertificate();
		if (cert == null) {
			return;
		}
		String warnMsg = Constant.messages.getString("dynssl.warn.cert.expired", cert.getNotAfter().toString(),
				new Date().toString());
		if (View.isInitialised()) {
			getView().showWarningDialog(warnMsg);
		}
		logger.warn(warnMsg);
	}
1178562
def is_authorization_expired(self):
        
        if not self.auth.token_expiration:
            return True
        return (datetime.datetime.utcnow() > self.auth.token_expiration)
730488
def check_keepalive(self):
        """"""
        if self.sock != NC.INVALID_SOCKET and time.time() - self.last_msg_out >= self.keep_alive:
            if self.state == NC.CS_CONNECTED:
                self.send_pingreq()
            else:
                self.socket_close()
396490
def __checkExpiration(self, mtime=None):
        '''
            
        '''
        if not self.maxLockAge:
            return False

        if mtime is None:
            try:
                mtime = os.stat(self.lockPath).st_mtime
            except FileNotFoundError as e:
                return False

        if mtime < time.time() - self.maxLockAge:
            return True

        return False