Compute Greenwich sidereal time at the given ``Time``.
972523
def sidereal_time(t):
    """"""

    # Compute the Earth Rotation Angle.  Time argument is UT1.

    theta = earth_rotation_angle(t.ut1)

    # The equinox method.  See Circular 179, Section 2.6.2.
    # Precession-in-RA terms in mean sidereal time taken from third
    # reference, eq. (42), with coefficients in arcseconds.

    t = (t.tdb - T0) / 36525.0
    st =        ( 0.014506 +
        (((( -    0.0000000368   * t
             -    0.000029956  ) * t
             -    0.00000044   ) * t
             +    1.3915817    ) * t
             + 4612.156534     ) * t)

    # Form the Greenwich sidereal time.

    return (st / 54000.0 + theta * 24.0) % 24.0
949469
def goto_time(timeval):
    '''

    '''
    i = bisect.bisect(viewer.frame_times, timeval * 1000)
    goto_frame(i)
71661
def change_time(self):
    """"""
    if self._stat_info is None:
      return None

    timestamp = int(self._stat_info.st_ctime)
    return dfdatetime_posix_time.PosixTime(timestamp=timestamp)
310176
def longitude(self, value):
        """"""
        self._longitude = math.radians(float(value))

        # update time_zone
        if abs((value / 15.0) - self.time_zone) > 1:
            # if time_zone doesn't match the longitude update the time_zone
            self.time_zone = value / 15.0
169140
def ToDatetime(self):
    """"""
    return datetime.utcfromtimestamp(
        self.seconds + self.nanos / float(_NANOS_PER_SECOND))
1296143
def check_time(value):
    """"""
    if value is None:
        return None
    if isinstance(value, (time.struct_time, tuple)):
        return value
    if isinstance(value, datetime.datetime):
        return value.timetuple()
    if isinstance(value, datetime.date):
        res = datetime.datetime.utcnow()
        res.replace(year=value.year, month=value.month, day=value.day)
        return res.timetuple()
    if isinstance(value, datetime.time):
        return datetime.datetime.combine(datetime.date.today(),
                                         value).timetuple()
    if isinteger(value):
        # Handle integer as timestamp
        return time.gmtime(value)
    if isinstance(value, basestring):
        if value.lower() == 'now':
            return time.gmtime()
        # TODO: parsinng some popular strings
    raise ValueError("Unsupported time representation:" + repr(value))
551410
def julian2sidereal(Jdate: float) -> float:
    

    jdate = np.atleast_1d(Jdate)
    assert jdate.ndim == 1

    tsr = np.empty(jdate.size)
    for i, jd in enumerate(jdate):
        # %% Vallado Eq. 3-42 p. 184, Seidelmann 3.311-1
        tUT1 = (jd - 2451545.0) / 36525.

        # Eqn. 3-47 p. 188
        gmst_sec = (67310.54841 + (876600 * 3600 + 8640184.812866) *
                    tUT1 + 0.093104 * tUT1**2 - 6.2e-6 * tUT1**3)

        # 1/86400 and %(2*pi) implied by units of radians
        tsr[i] = gmst_sec * (2 * pi) / 86400. % (2 * pi)

    return tsr.squeeze()
247855
def get_time(time_to_convert=None):
    """"""
    if time_to_convert is None:
        time_to_convert = time.time()
    return time.strftime(TIMESTAMP_FORMAT, time.localtime(time_to_convert))
171645
function time(start) {
  let delta = new Date() - start;
  delta = delta < 10000 ? `${delta}ms` : `${Math.round(delta / 1000)}s`;
  return humanize(delta);
}
730871
def real(self):
        ''' 
        '''
        result = self.__raw['1'].copy()
        result['c'] = self.__raw['1']['value']
        result['value'] = self.__raw['200']['v2']
        result['date'] = self.__raw['0']['time']
        return result
90556
def _elapsed_time(begin_time, end_time):
    

    bt = _str2datetime(begin_time)
    et = _str2datetime(end_time)

    return float((et - bt).seconds)
466620
def elapse_time(start, end=None, precision=3):
    
    if end is None:
        end = time_module.time()
    return round(end-start, precision)
718598
def modification_time(self):
    """"""
    timestamp = getattr(self._tar_info, 'mtime', None)
    if timestamp is None:
      return None
    return dfdatetime_posix_time.PosixTime(timestamp=timestamp)
1150611
def _get_date(data, position, dummy, opts):
    """"""
    end = position + 8
    millis = _UNPACK_LONG(data[position:end])[0]
    diff = ((millis % 1000) + 1000) % 1000
    seconds = (millis - diff) / 1000
    micros = diff * 1000
    if opts.tz_aware:
        return EPOCH_AWARE + datetime.timedelta(
            seconds=seconds, microseconds=micros), end
    else:
        return EPOCH_NAIVE + datetime.timedelta(
            seconds=seconds, microseconds=micros), end
727381
def _self_time(self):
    """"""
    return self.duration() - sum([child.duration() for child in self.children])
732481
def timestamp_from_datetime(date_time):
    """"""
    if date_time.tzinfo is None:
      return time.mktime((date_time.year, date_time.month, date_time.day, date_time.hour,
                          date_time.minute, date_time.second,
                          -1, -1, -1)) + date_time.microsecond / 1e6
    return (date_time - _EPOCH).total_seconds()
368592
def dt2ts(dt):
    """"""
    # Note: no assertion to really keep this fast
    assert isinstance(dt, (datetime.datetime, datetime.date))
    ret = time.mktime(dt.timetuple())
    if isinstance(dt, datetime.datetime):
        ret += 1e-6 * dt.microsecond
    return ret