returns the earliest deadline point in time
508512
def _get_deadline(results, timeout=None):
    
    start_time = time()

    all_deadlines = set(result.get_deadline() for result in results)
    all_deadlines.discard(None)
    if timeout is not None:
        all_deadlines.add(start_time + timeout)
    return min(all_deadlines) if all_deadlines else None
55642
def getDueDate(self):
        """"""
        due_dates = map(lambda an: an.getDueDate, self.getAnalyses())
        return due_dates and min(due_dates) or None
749502
def get_std_end_date(self):
        
        _, second = self._val
        if second != datetime.max:
            return second.strftime("%Y-%m-%d %H:%M:%S")
        else:
            return ""
1286074
public Long getOldestTaskCreatedTime(){
	    Timer.Context ctx = getOldestTaskTimeTimer.time();
	    try {
    	    long oldest = Long.MAX_VALUE;
    	    
    	    /*
    	     * I am asking this question first, because if I ask it after I could
    	     * miss the oldest time if the oldest is polled and worked on
    	     */
    	    Long oldestQueueTime = this.taskQueue.getOldestQueueTime();
    	    if(oldestQueueTime != null)
    	        oldest = oldestQueueTime;
    	    
    	    //there is a tiny race condition here... but we just want to make our best attempt
    	    long inProgressOldestTime = tasksInProgressTracker.getOldestTime();
    	    
    	    if(inProgressOldestTime < oldest)
    	        oldest = inProgressOldestTime;
    	    
    	    return oldest;
	    } finally {
	        ctx.stop();
	    }
	}
1243662
def _delay(self) -> int:
        """"""
        try:
            return int(self.journey.MainStop.BasicStop.Dep.Delay.text)
        except AttributeError:
            return 0
1307780
public Date getFinish()
   {
      Date result = (Date) getCachedValue(AssignmentField.FINISH);
      if (result == null)
      {
         result = getTask().getFinish();
      }
      return result;
   }
455838
def closest_point(time)
      segment = segments.select { |s| s.contains_time?(time) }
      segment.first
    end
969117
private Date getTimeBefore(Date endTime) {

    return (cronEx == null) ? null : cronEx.getTimeBefore(endTime);
  }
227949
def end_time(self):
        """"""
        try:
            return self.start_time + SCAN_DURATION[self.sector]
        except KeyError:
            return self.start_time
1199164
def U(self):
    ""
    if getattr(self.data, 'tzinfo', None):
      return int(calendar.timegm(self.data.utctimetuple()))
    else:
      return int(time.mktime(self.data.timetuple()))
198648
function getLongestDelay(delays) {
    var latest, lid;
    for(var id in delays) {
      var available = delays[id].available;
      if(!latest || available < latest) {
        latest = available;
        lid = id;
      }
    }

    return lid;
  }
880561
def value(self, t):
        """"""
        fraction = min(float(t) / max(1, self.schedule_timesteps), 1.0)
        return self.initial_p + fraction * (self.final_p - self.initial_p)
169140
def ToDatetime(self):
    """"""
    return datetime.utcfromtimestamp(
        self.seconds + self.nanos / float(_NANOS_PER_SECOND))
948260
def date(self):
        """"""
        if self.commit_time:
            return datetime.utcfromtimestamp(self.commit_time)
        else:
            return datetime.now()
503709
def _getMyFirstDatetimeFrom(self):
        
        myStartDt = getAwareDatetime(self.repeat.dtstart, None,
                                     self.tz, dt.time.min)
        return self.__after(myStartDt, excludeCancellations=False)
95107
def elapsed(self):
        
        if not self.start_date:
            return None
        return (self.end_date or datetime.utcnow()) - self.start_date
315505
def _getFromDt(self):
        
        myNow = timezone.localtime(timezone=self.tz)
        return self.__after(myNow) or self.__before(myNow)