// After produces a channel that will emit the time after a duration passes.
517726
func (m *Mock) After(d time.Duration) <-chan time.Time {
	return m.Timer(d).C
}
1235895
func (session *Session) After(closures func(interface{})) *Session {
	if closures != nil {
		session.afterClosures = append(session.afterClosures, closures)
	}
	return session
}
1289667
func (t *Transition) Then(fn Handler) *Transition {
	t.fn = fn
	return t
}
400916
func (dc DefaultClock) AfterFunc(d time.Duration, f func()) Timer {
	return &defaultTimer{*time.AfterFunc(d, f)}
}
1097241
func (fc *fakeClock) Since(t time.Time) time.Duration {
	return fc.Now().Sub(t)
}
15119
func (System) After(d time.Duration) <-chan time.Time {
	return time.After(d)
}
1137609
func after(now, notOnOrAfter time.Time) bool {
	return now.After(notOnOrAfter.Add(allowedClockDrift))
}
1178364
func (p Pos) After(u Pos) bool {
	return u.Offset < p.Offset || u.Line < p.Line
}
128797
func (p *Plugin) AfterInit() (err error) {
	cfgCopy := *p.Config

	var handler http.Handler = p.mx
	if p.Authenticator != nil {
		handler = auth(handler, p.Authenticator)
	}

	p.server, err = ListenAndServe(cfgCopy, handler)
	if err != nil {
		return err
	}

	if cfgCopy.UseHTTPS() {
		p.Log.Info("Listening on https://", cfgCopy.Endpoint)
	} else {
		p.Log.Info("Listening on http://", cfgCopy.Endpoint)
	}

	return nil
}
277513
func (c *TCP) PublishAfter(tags []string, data string, delay time.Duration) error {
	go func() {
		<-time.After(delay)
		c.Publish(tags, data)
	}()
	return nil
}
1131383
func Since(ctx context.Context, key interface{}) time.Duration {
	if startedAt, ok := ctx.Value(key).(time.Time); ok {
		return time.Since(startedAt)
	}
	return 0
}
406499
func AfterPrint(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "afterprint", Listener: listener}
}
1112278
func (mr *MockClockMockRecorder) After(arg0 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "After", reflect.TypeOf((*MockClock)(nil).After), arg0)
}
834827
func (f *FakeClock) Since(ts time.Time) time.Duration {
	return f.Time.Sub(ts)
}
957059
func (m *EventHandler) Wait(d time.Duration) bool {
	select {
	case <-m.Recv:
		return true
	case <-time.After(d):
		return false
	}
}
1159839
func (l *TimeLimiter) wait(now time.Time) time.Duration {

	// if we passed the window, reset and start over
	// if clock is adjusted backwards, best we can do is also just reset and start over
	if now.After(l.next) || now.Before(l.since) {
		l.timeSpent = 0
		l.since = now
		l.next = now.Add(l.window)
		return 0
	}
	if l.timeSpent < l.limit {
		return 0
	}

	// here we know that:
	// since <= now <= next
	// timespent >= limit
	timeToPass := time.Duration(float64(l.timeSpent) * l.factor)
	timePassed := now.Sub(l.since)

	// not sure if this should happen, but let's be safe anyway
	if timePassed > timeToPass {
		return 0
	}
	return timeToPass - timePassed
}
498085
func (f *FakeClock) Since(ts time.Time) time.Duration {
	f.lock.RLock()
	defer f.lock.RUnlock()
	return f.time.Sub(ts)
}