Returns true if the given time occurs within any of the segments of this track.
172893
def contains_time?(time)
      segments.each do |seg|
        return true if seg.contains_time?(time)
      end
      false
    end
1105681
public final boolean hasFreshData(InternalClock t) {
    if (nextRefreshTime >= DATA_VALID) {
      return true;
    }
    if (needsTimeCheck()) {
      return t.millis() < -nextRefreshTime;
    }
    return false;
  }
493865
def at_time(self, time, nearest_sample=False):
        
        if nearest_sample:
            time += self.delta_t / 2.0
        return self[int((time-self.start_time)*self.sample_rate)]
470076
public boolean isDisjunct() {

        for (int i = 0, n = this.intervals.size() - 1; i < n; i++) {
            ChronoInterval<T> current = this.intervals.get(i);
            ChronoInterval<T> next = this.intervals.get(i + 1);
            if (current.getEnd().isInfinite() || next.getStart().isInfinite()) {
                return false;
            } else if (current.getEnd().isOpen()) {
                if (this.isAfter(current.getEnd().getTemporal(), next.getStart().getTemporal())) {
                    return false;
                }
            } else if (!this.isBefore(current.getEnd().getTemporal(), next.getStart().getTemporal())) {
                return false;
            }
        }

        return true;

    }
161251
def valid_time(x: str) -> bool:
    
    if isinstance(x, str) and (
        re.match(TIME_PATTERN1, x) or re.match(TIME_PATTERN2, x)
    ):
        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
117090
def trigger(self):
        ''''''
        tnow = time.time()

        if tnow < self.last_time:
            print("Warning, time moved backwards. Restarting timer.")
            self.last_time = tnow

        if self.last_time + (1.0/self.frequency) <= tnow:
            self.last_time = tnow
            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
341585
def check(self):
    

    if self.value is None:
      return True
    return (time.clock() - self.start) >= self.value
882000
public boolean contains(ChronoInterval<T> interval) {

        for (ChronoInterval<T> i : this.intervals) {
            if (i.equals(interval)) {
                return true;
            }
        }

        return false;

    }
916584
def type_has_good_TimeMS(self, type):
        ''''''
        if type.startswith('ACC'):
            return False;
        if type.startswith('GYR'):
            return False;
        return True
972499
def schedule_next?(time)
      next_occurrence = @schedule.next_occurrence(time)
      if @last_scheduled != next_occurrence.to_i
        @last_scheduled = next_occurrence.to_i
        return true
      end
      false
    end
838213
public function isDelayed()
    {
        if ($this->enabled && $this->lastbeat) {
            $now = microtime(true);
            return ($now - $this->lastbeat > $this->intervalUsed);
        }
        return false;
    }
440446
private boolean hasTimestamp(Iterable<TimestampedValue<Object>> elements) {
		Iterator<TimestampedValue<Object>> it = elements.iterator();
		if (it.hasNext()) {
			return it.next().hasTimestamp();
		}
		return false;
	}
1254680
def is_eligible(self, segment):
        
        if not segment or not segment.sampled:
            return False

        return segment.get_total_subsegments_size() > self.streaming_threshold
175857
function isDaySegmentCollision(segment, otherSegments) {
	for (var i=0; i<otherSegments.length; i++) {
		var otherSegment = otherSegments[i];
		if (
			otherSegment.leftCol <= segment.rightCol &&
			otherSegment.rightCol >= segment.leftCol
		) {
			return true;
		}
	}
	return false;
}
1070933
private boolean containsInterval(Interval i) {
        if (i != null) {
            return directedGraph.contains(i.getStart())
                    && directedGraph.contains(i.getFinish());
        } else {
            return false;
        }
    }