ETA stands for Estimated Time of Arrival.
548104
def eta
      if @current == 0
        "ETA:  --:--:--"
      else
        elapsed_time = Time.now - @start_time
        estimated_time = elapsed_time * @total / @current - elapsed_time
        sprintf("ETA:  %s", format_time(estimated_time))
      end
    end
674711
def signup_time_future(self):
        """"""
        now = datetime.datetime.now()
        return (now.date() < self.date or (self.date == now.date() and self.signup_time > now.time()))
29353
def GetStartTime(self, problems=problems_module.default_problem_reporter):
    """"""
    cursor = self._schedule._connection.cursor()
    cursor.execute(
        'SELECT arrival_secs,departure_secs FROM stop_times WHERE '
        'trip_id=? ORDER BY stop_sequence LIMIT 1', (self.trip_id,))
    (arrival_secs, departure_secs) = cursor.fetchone()
    if arrival_secs != None:
      return arrival_secs
    elif departure_secs != None:
      return departure_secs
    else:
      problems.InvalidValue('departure_time', '',
                            'The first stop_time in trip %s is missing '
                            'times.' % self.trip_id)
1305137
private Set<Integer> matchWithClosestAisMessageIfBufferLargeEnough(
			long arrivalTime, Integer earliestTimestampLineIndex) {
		String timestampLine = getLine(earliestTimestampLineIndex);
		long time = getLineTime(earliestTimestampLineIndex);
		log.debug("ts=" + timestampLine + ",time=" + time);
		Set<Integer> removeThese;
		if (arrivalTime - time > MAXIMUM_ARRIVAL_TIME_DIFFERENCE_MS) {
			removeThese = matchWithClosestAisMessageAndFindIndexesToRemove(
					earliestTimestampLineIndex, timestampLine, time);
		} else
			removeThese = findExpiredIndexesBeforeIndex(earliestTimestampLineIndex);
		return removeThese;
	}
827303
function(ta) {
				var fm = this.fm,
					dfrd = $(ta).data('dfrd');
				if (dfrd && dfrd.state() === 'pending') {
					dfrd.reject();
				}
			}
1315362
def get_time_eta(total_done, total, start_time):
    
    time_done = int(time()) - start_time
    speed = total_done / time_done

    if time_done > 0 and speed > 0:
        total_to_go = total - total_done
        time_to_go = total_to_go / speed
        minutes, seconds = divmod(time_to_go, 60)
        hours, minutes = divmod(minutes, 60)
        percentage = total_done * 100.0 / total
    else:
        percentage = 0
        hours = 0
        minutes = 0
        seconds = 0

    return {
        "done": int(total_done),
        "tot": int(total),
        "%": float("{0:.2f}".format(percentage)),
        "h": int(hours),
        "m": int(minutes),
        "s": int(seconds)
    }
464562
function updateInterpolatedTimes (cfg, callback) {
  const db = cfg.db
  const lastTimepoint = cfg.lastTimepoint
  const nextTimepoint = cfg.nextTimepoint
  const timeDiff = nextTimepoint.arrival_time - lastTimepoint.departure_time
  let literal
  // sqlite null is a string
  if (nextTimepoint.shape_dist_traveled && nextTimepoint.shape_dist_traveled !== 'NULL') {
    // calculate interpolation based off of distance ratios
    const distanceTraveled = nextTimepoint.shape_dist_traveled - lastTimepoint.shape_dist_traveled
    literal = `${lastTimepoint.departure_time} +
      ${timeDiff} *
      (shape_dist_traveled - ${lastTimepoint.shape_dist_traveled}) /
      ${distanceTraveled}`
  } else {
    // calculate interpolation based off of stop sequence ratios
    const numStopsPassed = nextTimepoint.stop_sequence - lastTimepoint.stop_sequence
    literal = `${lastTimepoint.departure_time} +
      ${timeDiff} *
      (stop_sequence - ${lastTimepoint.stop_sequence}) /
      ${numStopsPassed}`
  }
  const updateLiteral = db.sequelize.literal(literal)
  db.stop_time
    .update(
      {
        arrival_time: updateLiteral,
        departure_time: updateLiteral
      },
      {
        where: {
          trip_id: lastTimepoint.trip_id,
          stop_sequence: {
            $gt: lastTimepoint.stop_sequence,
            $lt: nextTimepoint.stop_sequence
          }
        }
      }
    )
    .then(() => {
      callback()
    })
    .catch(callback)
}
608602
def observed(self, date_observed=None):
        """"""
        if self.name != 'Indicator':
            self.tcex.log.warning(u'Observed endpoint only available for "indicator" endpoint.')
        else:
            self._request_uri = '{}/observed'.format(self._request_uri)
            if date_observed is not None:
                self._request.add_payload('dateObserved', date_observed)
1328890
def timing(description, duration, params = {})
      Gateway.timing(stat(description), duration, gateway_params(params))
    end
374470
function( options, callback ) {

    debug( 'schedule', options )

    var self = this

    var protocol = options.protocol || 'rest'
    var format = options.format || 'json'
    var baseUrl = 'schedules/' + protocol + '/v1/' + format + '/flight'

    var carrier = options.airlineCode
    var flightNumber = options.flightNumber
    var year = options.date.getFullYear()
    var month = options.date.getMonth() + 1
    var day = options.date.getDate()
    var direction = /^dep/i.test( options.direction ) ?
      'departing' : 'arriving'

    var extensions = [
      'includeDirects',
      'includeCargo',
      'useInlinedReferences'
    ]

    if( Array.isArray( options.extendedOptions ) ) {
      extensions = extensions.concat( options.extendedOptions )
    }

    return this._clientRequest({
      url: baseUrl + '/' + carrier + '/' + flightNumber + '/' + direction + '/' + year + '/' + month + '/' + day,
      extendedOptions: extensions,
    }, function( error, data ) {

      if( data != null ) {
        data = FlightStats.formatSchedule( data )
        if( options.airport && data.flights ) {
          data.flights = FlightStats.filterByAirport( data.flights, options.airport, options.direction )
        }
      }

      callback.call( self, error, data )

    })

  }
160565
def _eta_from_phi(self):
        """"""
        self.eta = scipy.ndarray(N_NT - 1, dtype='float')
        etaprod = 1.0
        for w in range(N_NT - 1):
            self.eta[w] = 1.0 - self.phi[w] / etaprod
            etaprod *= self.eta[w]
        _checkParam('eta', self.eta, self.PARAMLIMITS, self.PARAMTYPES)
1210075
def human_estimate(self, upgrades):
        
        val = self.estimate(upgrades)
        if val < 60:
            return "less than 1 minute"
        elif val < 300:
            return "less than 5 minutes"
        elif val < 600:
            return "less than 10 minutes"
        elif val < 1800:
            return "less than 30 minutes"
        elif val < 3600:
            return "less than 1 hour"
        elif val < 3 * 3600:
            return "less than 3 hours"
        elif val < 6 * 3600:
            return "less than 6 hours"
        elif val < 12 * 3600:
            return "less than 12 hours"
        elif val < 86400:
            return "less than 1 day"
        else:
            return "more than 1 day"
5825
func (c *Response) ETA() time.Time {
	if c.IsComplete() {
		return c.End
	}
	bt := c.BytesComplete()
	bps := c.transfer.BPS()
	if bps == 0 {
		return time.Time{}
	}
	secs := float64(c.Size-bt) / bps
	return time.Now().Add(time.Duration(secs) * time.Second)
}
543574
def GetTimeStops(self):
    """"""
    return [(st.arrival_secs, st.departure_secs, st.stop) for st in
            self.GetStopTimes()]
364780
String generateArrivalTime(RouteProgress routeProgress, Calendar time) {
    MapboxNavigationOptions options = mapboxNavigation.options();
    double legDurationRemaining = routeProgress.currentLegProgress().durationRemaining();
    int timeFormatType = options.timeFormatType();
    String arrivalTime = formatTime(time, legDurationRemaining, timeFormatType, isTwentyFourHourFormat);
    String formattedArrivalTime = String.format(etaFormat, arrivalTime);
    return formattedArrivalTime;
  }
435646
protected void updateTicketState() {
        LOGGER.trace("Before updating ticket [{}]\n\tPrevious time used: [{}]\n\tLast time used: [{}]\n\tUsage count: [{}]",
            getId(), this.previousTimeUsed, this.lastTimeUsed, this.countOfUses);

        this.previousTimeUsed = ZonedDateTime.from(this.lastTimeUsed);
        this.lastTimeUsed = ZonedDateTime.now(ZoneOffset.UTC);
        this.countOfUses++;

        LOGGER.trace("After updating ticket [{}]\n\tPrevious time used: [{}]\n\tLast time used: [{}]\n\tUsage count: [{}]",
            getId(), this.previousTimeUsed, this.lastTimeUsed, this.countOfUses);
    }
129623
def request_time(self, req):
        """"""
        r = time.time()
        self._time_result.set_value(r)
        return ("ok", r)