// Clock sets the time provider clock, handy for testing
334445
func Clock(c timetools.TimeProvider) TtlMapOption {
	return func(m *TtlMap) error {
		m.clock = c
		return nil
	}
}
875342
func Time(from time.Time, maxDelta time.Duration) time.Time {
	globalLk.Lock()
	defer globalLk.Unlock()
	return globalGen.Time(from, maxDelta)
}
590886
func (t Time) Compare(o Time) int {
	return compareTime(t.Time, o.Time)
}
1251696
func (k *Key) Time() (time.Time, error) {
	return k.TimeFormat(time.RFC3339)
}
1069738
func (formatter *Formatter) Time(format string) string {
	return formatter.Event.Time.Format(format)
}
1036994
func (f *FakeClock) SetTime(t time.Time) {
	f.lock.Lock()
	defer f.lock.Unlock()
	f.setTimeLocked(t)
}
1325257
func (eng *Engine) Clock(name string, tags ...Tag) *Clock {
	return eng.ClockAt(name, time.Now(), tags...)
}
1047793
func (s *GetLogGroupFieldsInput) SetTime(v int64) *GetLogGroupFieldsInput {
	s.Time = &v
	return s
}
1060871
func (sc *SimulatedClock) SetTime(t time.Time) {
	sc.mu.Lock()
	defer sc.mu.Unlock()

	sc.t = t
}
8643
func (l *Logger) Timer() *Log {
	return &Log{
		Package: l.Name,
		Level:   "TIMER",
		Time:    Now(),
	}
}
1073931
func (g *Generator) Time(from time.Time, maxDelta time.Duration) time.Time {
	delta, ok := g.times[from]
	if !ok {
		delta = time.Duration(g.r.Uint64() % uint64(maxDelta))
		g.times[from] = delta
	} else {
		delta += time.Duration(g.r.Uint64() % uint64(maxDelta))
		g.times[from] = delta
	}
	return from.Add(delta)
}
995089
func (u UUID) Time() time.Time {
	if u.Version() != 1 {
		return time.Time{}
	}
	t := u.Timestamp()
	sec := t / 1e7
	nsec := (t % 1e7) * 100
	return time.Unix(sec+timeBase, nsec).UTC()
}
874702
func Time(ctx *cli.Context) command.Command {
	usage := "time"
	desc := "Returns the server time"

	return command.NewCommand("time", usage, desc, func(args ...string) ([]byte, error) {
		t := time.Now().Format(time.RFC1123)
		return []byte("Server time is: " + t), nil
	})
}
1066748
func (t *Timings) Time() int64 {
	t.mu.Lock()
	defer t.mu.Unlock()
	return t.totalTime
}
603194
func (t TimeSinceEpoch) Time() time.Time {
	ts := float64(t) / 1
	secs := int64(ts)
	nsecs := int64((ts - float64(secs)) * 1000000000)
	return time.Unix(secs, nsecs)
}
658795
func (t Time) Time() time.Time {
	return time.Unix(int64(t)/second, (int64(t)%second)*nanosPerTick)
}
633884
func (p *parser) Time(i int, context string) Time {
	s := p.String(i, context)
	if p.err != nil {
		return Time{}
	}
	v, err := ParseTime(s)
	if err != nil {
		p.SetErr(context, s)
	}
	return v
}