Return the index of the value associated with "timestamp" if any, else
        None. Since the timestamps are floating-point values, they are
        considered equal if their absolute difference is smaller than
        self.EPSILON
166888
def _lookup(self, timestamp):
        

        idx = search_greater(self._values, timestamp)
        if (idx < len(self._values)
                and math.fabs(self._values[idx][0] - timestamp) < self.EPSILON):
            return idx
        return None
1173479
def get_min_from_t(self, timestamp):
        
        if self.is_time_valid(timestamp):
            return timestamp
        t_day_epoch = get_day(timestamp)
        tr_mins = self.get_min_sec_from_morning()
        return t_day_epoch + tr_mins
90843
def get_value(format=CFDate::TIMESTAMP_UNIX)
      if(format == CFDate::TIMESTAMP_UNIX) then
        @value.to_i
      else
        @value.to_f - CFDate::DATE_DIFF_APPLE_UNIX
      end
    end
193359
def st_atime(self):
        """"""
        atime = self._st_atime_ns / 1e9
        return atime if self.use_float else int(atime)
507246
def _dfromtimestamp(timestamp):
    
    try:
        return datetime.date.fromtimestamp(timestamp)
    except OSError:
        timestamp -= time.timezone
        d = datetime.date(1970, 1, 1) + datetime.timedelta(seconds=timestamp)
        if _isdst(d):
            timestamp += 3600
            d = datetime.date(1970, 1, 1) + datetime.timedelta(seconds=timestamp)
        return d
1124359
def value(self):
        
        try:
            value = self.lastValue
        except IndexError:
            value = "NaN"
        except ValueError:
            value = "NaN"
        return value
1352129
private int getTimeX(double value) {
		double d = left + (((right - left) * value) / (maxTime - minTime));
		return (int) d;
	}
723188
function(timestamp) {
        if (!timestamp) {
            return;
        }
        //TODO check this
        //var secondsPerStamp = 1.001,
        var timesplit = timestamp.replace(',', ':').split(':');
        return (parseInt(timesplit[0], 10) * 3600 +
            parseInt(timesplit[1], 10) * 60 +
            parseInt(timesplit[2], 10) +
            parseInt(timesplit[3], 10) / 1000) * 1000 * 1000;

    }
899681
def TimestampToRDFDatetime(timestamp):
  """"""
  # TODO(hanuszczak): `timestamp` should be of MySQL type `Decimal`. However,
  # it is unclear where this type is actually defined and how to import it in
  # order to have a type assertion.
  if timestamp is None:
    return None
  else:
    micros = int(1000000 * timestamp)
    return rdfvalue.RDFDatetime.FromMicrosecondsSinceEpoch(micros)
601289
public int getValue (long tickStamp)
    {
        if (_startStamp == 0L) {
            _startStamp = tickStamp;
        }

        int dt = (int)(tickStamp - _startStamp);
        if (dt <= 0) {
            return _start;
        } else if (dt >= _duration) {
            return _end;
        } else {
            return computeValue(dt);
        }
    }
1104414
def compare_timestamp(src, dst):
  

  try:
    dst_time = os.path.getmtime(dst)
  except OSError as exc:
    if exc.errno == errno.ENOENT:
      return True  # dst does not exist

  src_time = os.path.getmtime(src)
  return src_time > dst_time
602069
def get_nonce_timestamp(nonce):
    '''
    
    '''
    components = nonce.split(':',2)
    if not len(components) == 3:
        return None

    try:
        return float(components[0])
    except ValueError:
        return None
1249311
def pp_timestamp(t):
    
    if t is None:
        return ''
    h, m, s = int(t / 3600), int(t / 60 % 60), t % 60
    return "%02d:%02d:%05.2f" % (h, m, s)
9202
def _timestamp_instants_eq(a, b):
    """"""
    assert isinstance(a, datetime)
    if not isinstance(b, datetime):
        return False
    # datetime's __eq__ can't compare a None offset and a non-None offset. For these equivalence semantics, a None
    # offset (unknown local offset) is treated equivalently to a +00:00.
    if a.tzinfo is None:
        a = a.replace(tzinfo=OffsetTZInfo())
    if b.tzinfo is None:
        b = b.replace(tzinfo=OffsetTZInfo())
    # datetime's __eq__ implementation compares instants; offsets and precision need not be equal.
    return a == b
189618
def timestamp(self, value):
        
        if not self._timestamp_is_valid(value):
            value = self._calculate_current_timestamp()
        self._timestamp = value
1110428
def __timestamp():
    """"""
    today = time.time()
    ret = struct.pack(b'=L', int(today))
    return ret
358501
function getElapsedTimeString(start_timestamp_ms, updated_timestamp_ms) {
  var updatedDiff = updated_timestamp_ms - start_timestamp_ms;
  var updatedDays = Math.floor(updatedDiff / 86400000.0);
  updatedDiff -= (updatedDays * 86400000.0);
  var updatedHours = Math.floor(updatedDiff / 3600000.0);
  updatedDiff -= (updatedHours * 3600000.0);
  var updatedMinutes = Math.floor(updatedDiff / 60000.0);
  updatedDiff -= (updatedMinutes * 60000.0);
  var updatedSeconds = Math.floor(updatedDiff / 1000.0);

  var updatedString = '';
  if (updatedDays == 1) {
    updatedString = '1 day, ';
  } else if (updatedDays > 1) {
    updatedString = '' + updatedDays + ' days, ';
  }
  updatedString +=
      leftPadNumber(updatedHours, 2, '0') + ':' +
      leftPadNumber(updatedMinutes, 2, '0') + ':' +
      leftPadNumber(updatedSeconds, 2, '0');

  return updatedString;
}