// If set, base::Time::Now will be overriden to initially return this value.
546497
func InitialVirtualTime(t time.Time) setVirtualTimerPolicyOption {
	return func(p Params) {
		p["initialVirtualTime"] = float64(t.Unix())
	}
}
1140321
func parseTime(t interface{}) (time.Time, error) {
	var err error
	var calcTime time.Time
	switch v := t.(type) {
	case string:
		if calcTime, err = time.Parse(TimeFormat, v); err != nil {
			return time.Time{}, errors.New("cannot parse string time")
		}
	case int64:
		calcTime = time.Unix(v, 0).UTC()
	default:
		return time.Time{}, errors.New("arg must be a timestamp")
	}
	return calcTime, nil
}
1060871
func (sc *SimulatedClock) SetTime(t time.Time) {
	sc.mu.Lock()
	defer sc.mu.Unlock()

	sc.t = t
}
110927
func (c *chrono) Now() time.Time {
	var now time.Time
	if c.paused {
		now = c.pausedAt
	} else {
		now = time.Now()
	}
	return now.Add(c.skew)
}
124429
func (t TimeClock) Now() (Interval, error) {
	now := time.Now()
	return NewInterval(now.Add(-(*uncertainty)), now.Add(*uncertainty))
}
792245
func CurrentTime(tp uint8) Time {
	return Time{Time: FromGoTime(gotime.Now()), Type: tp, Fsp: 0}
}
1159061
func Time(ts *timestamp.Timestamp) time.Time {
	return time.Unix(ts.Seconds, int64(ts.Nanos))
}
297853
func (v *NowValuer) Value(key string) (interface{}, bool) {
	if !v.Now.IsZero() && key == "now()" {
		return v.Now, true
	}
	return nil, false
}
664746
func Time(t time.Time) NullTime {
	return NullTime{
		pq.NullTime{
			Time:  t,
			Valid: true,
		},
	}
}
286892
func compileTime() time.Time {
	info, err := os.Stat(os.Args[0])
	if err != nil {
		return time.Now()
	}
	return info.ModTime()
}
37754
func NewTimeValue(v interface{}) Value {
	switch t := v.(type) {
	case time.Time:
		return GoTime(t)
	default:
		panic(fmt.Errorf("%v(%T) is not supported yet", v, v))
	}
}
1096933
func (g *Generator) Time(loc *time.Location, base time.Time, dur time.Duration) time.Time {
	base = base.UTC()
	return base.Add(g.Duration(0, dur)).In(loc)
}
528203
func translateTimerAttributes(d time.Duration) (attrs map[string]interface{}) {
	attrs = make(map[string]interface{})
	attrs[DisplayTransform] = fmt.Sprintf("x/%d", int64(d))
	attrs[DisplayUnitsShort] = string(unitRegexp.Find([]byte(d.String())))
	return
}
253259
func (m *MockClock) SetTime(t time.Time) {
	m.cond.L.Lock()
	defer m.cond.L.Unlock()

	assertFuture(m.now, t)
	m.now = t
	m.cond.Broadcast()
}
854794
func IsFuture(d Dated) bool {
	if d.PublishDate().IsZero() {
		return false
	}
	return d.PublishDate().After(time.Now())
}
402501
func (t *Timer) Time(f func()) {
	s := time.Now()
	f()
	t.UpdateSince(s)
}
516325
func (s *State) now() *timestamp.Timestamp {
	c := s.Clock
	if c == nil {
		c = clock.GetSystemClock()
	}
	return google.NewTimestamp(c.Now())
}