Retrieves the start time of the incident/incidents from the output
        response

        Returns:
            start_time(namedtuple): List of named tuples of start time of the
            incident/incidents
776879
def start_time(self):
        
        resource_list = self.traffic_incident()
        start_time = namedtuple('start_time', 'start_time')
        if len(resource_list) == 1 and resource_list[0] is None:
            return None
        else:
            try:
                return [start_time(resource['start'])
                        for resource in resource_list]
            except (KeyError, TypeError):
                return [start_time(resource['StartTimeUTC'])
                        for resource in resource_list]
548076
def start_of_day(self) -> datetime:
        
        self.value = datetime(self.value.year, self.value.month, self.value.day)
        return self.value
1329137
def check(self):
		
		if self.__next_start is not None:
			utc_now = utc_datetime()
			if utc_now >= self.__next_start:
				result = []

				for task_source in self.__next_sources:
					records = task_source.has_records()
					if records is not None:
						result.extend(records)

				self.__update_all()

				if len(result) > 0:
					return tuple(result)
131990
def start(self):
        """"""
        if self.start_time is None:
            time = datetime.time(hour=19, tzinfo=CET)
        else:
            time = self.start_time.replace(tzinfo=CET)
        return datetime.datetime.combine(self.date, time)
991048
def get_times(self):
        
        if not self.n:
            return list()

        ret = list()

        for item in self._event_times:
            ret += list(self.__dict__[item])

        return ret + list(matrix(ret) - 1e-6)
564671
def timespan(start_time):
    """"""

    timespan = datetime.datetime.now() - start_time
    timespan_ms = timespan.total_seconds() * 1000
    return timespan_ms
697950
def starts_within(self, start=None, end=None):
        

        qs = self

        if start:
            dt_start=coerce_dt_awareness(start)
            qs = qs.filter(
                Q(is_all_day=False, start__gte=dt_start) |
                Q(is_all_day=True, start__gte=zero_datetime(dt_start))
            )
        if end:
            dt_end=coerce_dt_awareness(end, t=time.max)
            qs = qs.filter(
                # Exclusive for datetime, inclusive for date.
                Q(is_all_day=False, start__lt=dt_end) |
                Q(is_all_day=True, start__lte=zero_datetime(dt_end))
            )

        return qs
236275
def get_start_time_metadata(self):
        
        # Implemented from template for osid.resource.ResourceForm.get_group_metadata_template
        metadata = dict(self._mdata['start_time'])
        metadata.update({'existing_date_time_values': self._my_map['startTime']})
        return Metadata(**metadata)
619462
def lap(self):
        
        now = time.time()
        lap_time = now - self.lap_time
        total_time = now - self.start
        self.lap_time = now
        return lap_time, total_time
503709
def _getMyFirstDatetimeFrom(self):
        
        myStartDt = getAwareDatetime(self.repeat.dtstart, None,
                                     self.tz, dt.time.min)
        return self.__after(myStartDt, excludeCancellations=False)
274568
def get_response_time(chatbot, statement='Hello'):
    
    import time

    start_time = time.time()

    chatbot.get_response(statement)

    return time.time() - start_time
185745
def GetFrequencyStartTimes(self):
    """"""
    start_times = []
    # for each headway period of the trip
    for freq_tuple in self.GetFrequencyTuples():
      (start_secs, end_secs, headway_secs) = freq_tuple[0:3]
      # reset run secs to the start of the timeframe
      run_secs = start_secs
      while run_secs < end_secs:
        start_times.append(run_secs)
        # increment current run secs by headway secs
        run_secs += headway_secs
    return start_times
1108386
def end_time(self):
        
        resource_list = self.traffic_incident()
        end_time = namedtuple('end_time', 'end_time')
        if len(resource_list) == 1 and resource_list[0] is None:
            return None
        else:
            try:
                return [end_time(resource['end'])
                        for resource in resource_list]
            except (KeyError, TypeError):
                return [end_time(resource['EndTimeUTC'])
                        for resource in resource_list]
185417
def start_date(self) -> Optional[datetime.date]:
        
        if not self.intervals:
            return None
        return self.start_datetime().date()
737383
def get_time_spent(self):
        
        # Take another look at this. Not sure it's correct:
        if not self.has_started or not self.has_ended():
            raise errors.IllegalState()
        if self._my_map['completionTime'] is not None:
            return self.get_completion_time() - self.get_actual_start_time()
        else:
            raise errors.IllegalState()
707474
def congestion(self):
        
        resource_list = self.traffic_incident()
        congestion = namedtuple('congestion', 'congestion')
        if len(resource_list) == 1 and resource_list[0] is None:
            return None
        else:
            try:
                return [congestion(resource['congestion'])
                        for resource in resource_list]
            except (KeyError, TypeError):
                try:
                    return [congestion(resource['CongestionInfo'])
                            for resource in resource_list]
                except KeyError:
                    return None
792957
def _build_time_fields_spec(name_in_context: str) -> List[Dict[str, Any]]:
        
        return [
            {
                'Name': '_start_time',
                'Type': Type.DATETIME,
                'Value': ('time if {aggregate}._start_time is None else time '
                          'if time < {aggregate}._start_time else {aggregate}._start_time'
                          ).format(aggregate=name_in_context),
                ATTRIBUTE_INTERNAL: True
            },
            {
                'Name': '_end_time',
                'Type': Type.DATETIME,
                'Value': ('time if {aggregate}._end_time is None else time '
                          'if time > {aggregate}._end_time else {aggregate}._end_time'
                          ).format(aggregate=name_in_context),
                ATTRIBUTE_INTERNAL: True
            },
        ]