// Since is an equivalent of time.Since.
973333
func Since(ctx context.Context, t time.Time) time.Duration {
	return Now(ctx).Sub(t)
}
748921
func (c *Cron) now() time.Time {
	return time.Now().In(c.location)
}
834827
func (f *FakeClock) Since(ts time.Time) time.Duration {
	return f.Time.Sub(ts)
}
25662
func (t *TimeOfDay) toTime() (time.Time, error) {
	now := time.Time{}
	loc, err := time.LoadLocation(t.GetLocation())
	if err != nil {
		return now, errors.Reason("invalid location").Err()
	}
	now = now.In(loc)
	// Decompose the time into a slice of [time, <hour>, <minute>].
	m := regexp.MustCompile(timeRegex).FindStringSubmatch(t.GetTime())
	if len(m) != 3 {
		return now, errors.Reason("time must match regex %q", timeRegex).Err()
	}
	hr, err := strconv.Atoi(m[1])
	if err != nil || hr > 23 {
		return now, errors.Reason("time must not exceed 23:xx").Err()
	}
	min, err := strconv.Atoi(m[2])
	if err != nil || min > 59 {
		return now, errors.Reason("time must not exceed xx:59").Err()
	}
	return time.Date(now.Year(), now.Month(), now.Day(), hr, min, 0, 0, loc), nil
}
993717
func (tracerOptions) TimeNow(timeNow func() time.Time) TracerOption {
	return func(tracer *Tracer) {
		tracer.timeNow = timeNow
	}
}
611872
func (db *database) SinceLastUpdate() time.Duration {
	db.ml.RLock()
	defer db.ml.RUnlock()

	return db.config.now().Sub(db.last)
}
249845
func (cp *CallbackProcessor) After(callbackName string) *CallbackProcessor {
	cp.after = callbackName
	return cp
}
838626
func (r *RequestTrace) Done() {
	r.Response = time.Since(r.startTime)
	r.startTime = time.Now()
}
573670
func (f *FakeClock) After(d time.Duration) <-chan time.Time {
	f.lock.Lock()
	defer f.lock.Unlock()
	stopTime := f.time.Add(d)
	ch := make(chan time.Time, 1) // Don't block!
	f.waiters = append(f.waiters, fakeClockWaiter{
		targetTime: stopTime,
		destChan:   ch,
	})
	return ch
}
249338
function since(date) {
  if (typeof date !== 'object') {
    return date
  } else if (date.getTime) {
    return Math.floor(date.getTime() / 1000)
  }
  throw TypeError('Expected a date or number')
}
1097241
func (fc *fakeClock) Since(t time.Time) time.Duration {
	return fc.Now().Sub(t)
}
1151861
func (s *DescribeCasesInput) SetAfterTime(v string) *DescribeCasesInput {
	s.AfterTime = &v
	return s
}
671940
func (d Date) After(e Date) bool {
	return d.t.After(e.t)
}
1321486
func (r Range) Since(t time.Time) Range {
	if t.Before(r.Start) {
		return r
	}
	if t.After(r.End) {
		return Range{}
	}
	return Range{Start: t, End: r.End}
}
173406
func (p *Project) After() {
	if p.parent.After != nil {
		p.parent.After(Context{Project: p})
		return
	}
	p.cmd(nil, "after", true)
}
781861
func For(msg string, timeout, interval time.Duration, f func() (bool, error)) error {
	log.Infof("Wait for %s [timeout: %s, interval: %s]", msg, timeout, interval)

	var lastErr string
	timeUp := time.After(timeout)
	for {
		select {
		case <-timeUp:
			return fmt.Errorf("time limit exceeded: last error: %s", lastErr)
		default:
		}

		stop, err := f()
		if stop {
			return nil
		}
		if err != nil {
			lastErr = err.Error()
		}

		time.Sleep(interval)
	}
}
811792
func SinceInMicroseconds(start time.Time) float64 {
	return float64(time.Since(start).Nanoseconds() / time.Microsecond.Nanoseconds())
}