// Since returns the time elapsed since t.
432525
func (m *MockClock) Since(t time.Time) time.Duration {
	return m.Now().Sub(t)
}
1097241
func (fc *fakeClock) Since(t time.Time) time.Duration {
	return fc.Now().Sub(t)
}
758362
func After(d time.Duration) <-chan time.Time {
	if isTimeFrozen {
		currentFrozenTime = currentFrozenTime.Add(d)
		c := make(chan time.Time, 1)
		c <- currentFrozenTime
		return c
	}

	return time.After(d)
}
1058988
func (t *tree) until(until itemType, context string) item {
	for {
		token := t.next()
		switch token.typ {
		case until:
			return token
		case itemEOF:
			t.errorf("did not find %s in %s", until, context)
		}
	}
}
1246042
func (t *StandardResettingTimer) Update(d time.Duration) {
	t.mutex.Lock()
	defer t.mutex.Unlock()
	t.values = append(t.values, int64(d))
}
492062
func (t *Track) Duration() time.Duration {
	ms := C.sp_track_duration(t.sp_track)
	return time.Duration(ms) * time.Millisecond
}
602150
func (date Date) After(other Date) bool {
	return date.Time.After(other.Time)
}
488666
func (r *Linear) After() <-chan time.Time {
	if r.Duration() == 0 {
		return r.closedChan
	}
	return time.After(r.Duration())
}
1281076
func ToDuration(ms time.Time) time.Duration {
	return Elapsed(ms, time.Now())
}
112055
func ttlTime(expirationTime time.Time) template.HTML {
	ttl := time.Until(expirationTime).Round(time.Second)
	if ttl < 0 {
		return template.HTML("<b>Expired</b>")
	}
	return template.HTML(ttl.String())
}
400660
func (m *MockClock) After(d time.Duration) <-chan time.Time {
	ch := make(chan time.Time, 1)
	target := m.Now().Add(d)

	go func() {
		for {
			m.cond.L.Lock()
			if !target.After(m.now) {
				now := m.now
				m.cond.L.Unlock()
				ch <- now
				return
			}

			m.cond.Wait()
			m.cond.L.Unlock()
		}
	}()

	return ch
}
748921
func (c *Cron) now() time.Time {
	return time.Now().In(c.location)
}
601981
func (l *TimeLimiter) add(now time.Time, d time.Duration) {
	if now.After(l.next) {
		l.timeSpent = d
		l.since = now.Add(-d)
		l.next = l.since.Add(l.window)
		return
	}
	l.timeSpent += d
}
828383
func (i *Info) Before(t time.Time) bool {
	return i.genTimeMax().Before(t)
}
122006
func (c *Call) After(d time.Duration) *Call {
	c.lock()
	defer c.unlock()
	c.waitTime = d
	return c
}
611872
func (db *database) SinceLastUpdate() time.Duration {
	db.ml.RLock()
	defer db.ml.RUnlock()

	return db.config.now().Sub(db.last)
}
820744
func (ns *NamedStopwatch) Elapsed(name string) time.Duration {
	if ns == nil {
		return time.Duration(0)
	}
	ns.RLock()
	defer ns.RUnlock()

	if s, ok := ns.stopwatches[name]; ok {
		return s.Elapsed()
	}
	return time.Duration(0)
}