Return True if before is older than seconds.
976462
def is_older_than(before, seconds):
    """"""
    if isinstance(before, six.string_types):
        before = parse_strtime(before).replace(tzinfo=None)
    else:
        before = before.replace(tzinfo=None)

    return utcnow() - before > datetime.timedelta(seconds=seconds)
919249
def has_predecessor(self, graph, dest, orig, branch, turn, tick, *, forward=None):
        
        if forward is None:
            forward = self.db._forward
        return orig in self._get_origcache(graph, dest, branch, turn, tick, forward=forward)
458854
def clean_aged(time_now)
      near_past = time_now - @time_window_in_seconds
      @errors = @errors.reverse.select{|time_stamp| time_stamp  > near_past }.reverse.to_a
    end
386642
def date_in_past(self):
        
        now = datetime.datetime.now()
        return (now.date() > self.date)
377905
def on_for_seconds(self, speed, seconds, brake=True, block=True):
        

        if seconds < 0:
            raise ValueError("seconds is negative ({})".format(seconds))

        speed = self._speed_native_units(speed)
        self.speed_sp = int(round(speed))
        self.time_sp = int(seconds * 1000)
        self._set_brake(brake)
        self.run_timed()

        if block:
            self.wait_until('running', timeout=WAIT_RUNNING_TIMEOUT)
            self.wait_until_not_moving()
745822
def older_message(m, lastm):
    ''''''
    atts = {'time_boot_ms' : 1.0e-3,
            'time_unix_usec' : 1.0e-6,
            'time_usec' : 1.0e-6}
    for a in atts.keys():
        if hasattr(m, a):
            mul = atts[a]
            t1 = m.getattr(a) * mul
            t2 = lastm.getattr(a) * mul
            if t2 >= t1 and t2 - t1 < 60:
                return True
    return False
408485
private boolean isTimeAfterOrEquals(Calendar time1, Calendar time2) {
        return !(time1 == null || time2 == null) && time1.getTimeInMillis() >= time2.getTimeInMillis();
    }
1088772
def _past_datetime_from(self):
        
        prevDt = self.__localBefore(timezone.localtime(), dt.time.max,
                                    excludeCancellations=True,
                                    excludeExtraInfo=True)
        return prevDt
772525
def check_if_modified_since(self, dt, etag=None):
        """"""
        dt = dt.replace(microsecond=0)
        if request.if_modified_since and dt <= request.if_modified_since:
            raise SameContentException(etag, last_modified=dt)
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
139196
def seconds(num):
    
    now = pytime.time()
    end = now + num
    until(end)
604140
public boolean before(JKTimeObject thareTime) {
		if (getYear() == thareTime.getYear() || thareTime.getYear() > getYear()) {
			if (getMonth() == thareTime.getMonth() || thareTime.getMonth() > getMonth()) {

				if (thareTime.getMonth() > getMonth()) {
					return true;
				}
				if (thareTime.getDay() > getDay()) {
					return true;
				}
				if (getDay() == thareTime.getDay()) {
					if (getHour() == thareTime.getHour()) {
						if (getMunite() < thareTime.getMunite()) {
							return true;
						}
					}

					if (getHour() < thareTime.getHour()) {
						return true;
					}

				}
			}
		}

		return false;
	}
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
892088
def is_old(self):
        
        if not self.processing_started_ts:
            return True

        if self.processing_ended_ts:
            return self.processing_ended_ts + DB_CACHE_TIME < time.time()

        # in case that processing started, but didn't ended in
        # DB_MAX_WAIT_TIME
        expected_end_ts = self.creation_ts + DB_MAX_WAIT_TIME
        if expected_end_ts < time.time():
            logger.error("Prosessing timeouted and properites were not set!")

        return expected_end_ts < time.time()
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
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
219990
def time_between_updates(self):
        """"""
        if 'last_updated' not in self._original:
            return 0
        last_update = self._original['last_updated']
        this_update = self.last_updated
        return this_update - last_update