Returns true if the time is beyond the window
350406
def is_expired(self):
        '''
        
        '''
        if self.window is not None:
            return (self._time() - self.start_time) >= self.window
        return False
946497
def hasExpired(self):
        
        return (datetime.datetime.utcnow() - self.lastUpdateTime).total_seconds() > self.maxAgeSeconds
30067
def last_time_non_ok_or_up(self):
        
        non_ok_times = [x for x in [self.last_time_down]
                        if x > self.last_time_up]
        if not non_ok_times:
            last_time_non_ok = 0  # todo: program_start would be better?
        else:
            last_time_non_ok = min(non_ok_times)
        return last_time_non_ok
184806
def _before_valid_time_range(self):
        
        if self.start_time is not None:
            try:
                if self.time < self.start_time:
                    return True
            except TypeError:
                return False
        return False
66517
private function checkTime()
    {
        if (is_null($this->timeLimit)) {
            return false;
        }

        if (($this->startTime + $this->timeLimit) <= time()) {
            return true;
        }
        return false;
    }
408485
private boolean isTimeAfterOrEquals(Calendar time1, Calendar time2) {
        return !(time1 == null || time2 == null) && time1.getTimeInMillis() >= time2.getTimeInMillis();
    }
8776
private boolean isTypedTimeFullyLegal() {
        if (mIs24HourMode) {
            // For 24-hour mode, the time is legal if the hours and minutes are each legal. Note:
            // getEnteredTime() will ONLY call isTypedTimeFullyLegal() when NOT in 24hour mode.
            Boolean[] enteredZeros = {false, false, false};
            int[] values = getEnteredTime(enteredZeros);
            return (values[0] >= 0 && values[1] >= 0 && values[1] < 60 && values[2] >= 0 && values[2] < 60);
        } else {
            // For AM/PM mode, the time is legal if it contains an AM or PM, as those can only be
            // legally added at specific times based on the tree's algorithm.
            return (mTypedTimes.contains(getAmOrPmKeyCode(AM)) ||
                    mTypedTimes.contains(getAmOrPmKeyCode(PM)));
        }
    }
805131
protected boolean isLastTime(Date lastBackupTime) {
		if (lastBackupTime == null) {
			return true;
		}
		long diff = System.currentTimeMillis() - lastBackupTime.getTime();
		if (diff > (this.getInterval() * 1000L)) {
			// 10分钟前的时间算是上次备份时间
			return true;
		}
		return false;
	}
1025445
function isWindow(obj) {
  return obj && obj.document && obj.location && obj.alert && obj.setInterval;
}
1362928
private boolean isOK(TimeSpan timeSpan) {
	return res.exists() && (res.lastModified() + timeSpan.getMillis() >= System.currentTimeMillis());
    }
926464
def check_w3_time (self):
        """"""
        if time.time() - self.last_w3_call < W3Timer.SleepSeconds:
            time.sleep(W3Timer.SleepSeconds)
        self.last_w3_call = time.time()
188356
def check_in_bounds(self, date):
        '''
        '''
        dt = Timestamp(date)
        return ((self._lbound is None or dt >= self._lbound) and
                (self._rbound is None or dt <= self._rbound))
1069476
def later_than(after, before):
    
    if isinstance(after, six.string_types):
        after = str_to_time(after)
    elif isinstance(after, int):
        after = time.gmtime(after)

    if isinstance(before, six.string_types):
        before = str_to_time(before)
    elif isinstance(before, int):
        before = time.gmtime(before)

    if before is None:
        return True
    if after is None:
        return False
    return after >= before
195365
def contains(self, time: datetime.datetime,
                 inclusive: bool = True) -> bool:
        
        if inclusive:
            return self.start <= time <= self.end
        else:
            return self.start < time < self.end
1117266
def is_same_time(self):
        """"""
        return (
            self.local
            and self.remote
            and FileEntry._eps_compare(self.local.mtime, self.remote.mtime) == 0
        )
273587
def is_open(location, now=None):
    
    if now is None:
        now = get_now()

    if has_closing_rule_for_now(location):
        return False

    now_time = datetime.time(now.hour, now.minute, now.second)

    if location:
        ohs = OpeningHours.objects.filter(company=location)
    else:
        ohs = Company.objects.first().openinghours_set.all()
    for oh in ohs:
        is_open = False
        # start and end is on the same day
        if (oh.weekday == now.isoweekday() and
                oh.from_hour <= now_time and
                now_time <= oh.to_hour):
            is_open = oh

        # start and end are not on the same day and we test on the start day
        if (oh.weekday == now.isoweekday() and
                oh.from_hour <= now_time and
                ((oh.to_hour < oh.from_hour) and
                    (now_time < datetime.time(23, 59, 59)))):
            is_open = oh

        # start and end are not on the same day and we test on the end day
        if (oh.weekday == (now.isoweekday() - 1) % 7 and
                oh.from_hour >= now_time and
                oh.to_hour >= now_time and
                oh.to_hour < oh.from_hour):
            is_open = oh
            # print " 'Special' case after midnight", oh

        if is_open is not False:
            return oh
    return False
1327761
def is_daylight_saving_hour(self, datetime):
        """"""
        if not self.daylight_saving_period:
            return False
        return self.daylight_saving_period.isTimeIncluded(datetime.hoy)