Returns #True if the time interval has passed.
341585
def check(self):
    

    if self.value is None:
      return True
    return (time.clock() - self.start) >= self.value
805638
def check_if_ok_to_update(self):
        """"""
        current_time = int(time.time())
        last_refresh = self.last_refresh
        if last_refresh is None:
            last_refresh = 0
        if current_time >= (last_refresh + self.refresh_rate):
            return True
        return False
990682
def is_expired(self, max_idle_seconds):
        

        now = current_time()
        return (self.expiration_time is not None and self.expiration_time < now) or \
               (max_idle_seconds is not None and self.last_access_time + max_idle_seconds < now)
713002
def is_always_accessible(self):
        
        return self._val[0] == datetime.min and self._val[1] == datetime.max
190414
def time_afterwards_preceding(
            self, when: datetime.datetime) -> Optional[datetime.timedelta]:
        
        if self.is_empty():
            return None
        end_time = self.end_datetime()
        if when <= end_time:
            return datetime.timedelta()
        else:
            return when - end_time
440446
private boolean hasTimestamp(Iterable<TimestampedValue<Object>> elements) {
		Iterator<TimestampedValue<Object>> it = elements.iterator();
		if (it.hasNext()) {
			return it.next().hasTimestamp();
		}
		return false;
	}
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;
	}
271076
def lie_between(self, target_time_range):
        
        if self.begin_dt >= target_time_range.begin_dt and self.end_dt <= \
                target_time_range.end_dt:
            return True
        else:
            return False
1195912
def is_period_current(self):
		

		return self.current_period_end > timezone.now() or (
			self.trial_end and self.trial_end > timezone.now()
		)
656749
def get(self):
        """"""
        elapsed = datetime.now() - self._previous
        self._previous += elapsed
        return elapsed.total_seconds()
1110886
function isGreaterThan( &$time, $equal = false )
    {
        $t1 =& $this->Time;
        if ( $time instanceof eZTime )
            $t2 = $time->timeOfDay();
        else
            $t2 = ( $time % self::SECONDS_A_DAY );
        if ( $t1 > $t2 )
            return true;
        else if ( $equal and $t1 == $t2 )
            return true;
        else
            return false;
    }
144844
def do_intersect(self, another_time_range):
        
        if self.begin_dt > another_time_range.end_dt or self.end_dt < \
                another_time_range.begin_dt:
            return False
        else:
            return True
95107
def elapsed(self):
        
        if not self.start_date:
            return None
        return (self.end_date or datetime.utcnow()) - self.start_date
997285
def is_newer_than(after, seconds):
    """"""
    if isinstance(after, six.string_types):
        after = parse_strtime(after).replace(tzinfo=None)
    else:
        after = after.replace(tzinfo=None)

    return after - utcnow() > datetime.timedelta(seconds=seconds)
1157380
def is_continuous(self):
        """"""
        a_per = self.header.analysis_period
        if self._validated_a_period is True and a_per.st_hour == 0 and a_per.end_hour \
                == 23 and len(self.values) == len(a_per.months_per_hour):
            return True
        else:
            return False
68414
def is_active(self, timperiods):
        
        now = int(time.time())
        timperiod = timperiods[self.modulation_period]
        if not timperiod or timperiod.is_time_valid(now):
            return True
        return False
390607
def contains_interval(self, other):
        
        return (
            self.begin <= other.begin and
            self.end >= other.end
        )