Lines Matching refs:new_time_ranges
457 def IntersectTimeRanges(new_time_ranges, time_ranges): argument
462 while pos < len(time_ranges) and new_pos < len(new_time_ranges):
464 if new_time_ranges[new_pos][1] < time_ranges[pos][0]:
465 del new_time_ranges[new_pos]
468 if new_time_ranges[new_pos][0] > time_ranges[pos][1]:
473 while new_pos < len(new_time_ranges):
474 del new_time_ranges[new_pos]
478 if new_time_ranges[new_pos][0] < time_ranges[pos][0]:
479 new_time_ranges[new_pos][0] = time_ranges[pos][0]
481 if new_time_ranges[new_pos][1] > time_ranges[pos][1]:
482 r = [ time_ranges[pos][1] + 1, new_time_ranges[new_pos][1] ]
483 new_time_ranges[new_pos][1] = time_ranges[pos][1]
485 new_time_ranges.insert(new_pos, r)