// Returns the time.Duration until the next event.
17123
func (c *crontime) DurationUntilNextEvent() time.Duration {
	return c.nextEvent().Sub(time.Now())
}
851204
func WaitEventTimeout(timeout int) Event {
	var cevent CEvent
	_event := (*C.SDL_Event)(unsafe.Pointer(&cevent))
	ok := int(C.SDL_WaitEventTimeout(_event, C.int(timeout)))
	if ok == 0 {
		return nil
	}
	return goEvent(&cevent)
}
423141
func (r Range) Duration() time.Duration {
	return r.End.Sub(r.Start)
}
399007
func (k *Key) Duration() (time.Duration, error) {
	return time.ParseDuration(k.String())
}
1073586
func (_m *Client) GetTimeout() *time.Duration {
	ret := _m.Called()

	var r0 *time.Duration
	if rf, ok := ret.Get(0).(func() *time.Duration); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*time.Duration)
		}
	}

	return r0
}
79533
func (m *TimerMetrics) StatusDuration(duration time.Duration) {
	if m.statusEvery == 0 {
		return
	}

	m.Lock()
	m.position++
	var looped bool
	if m.position > m.statusEvery {
		// loop back around
		looped = true
		m.position = 1
	}
	if m.position > len(m.timings) {
		m.timings = append(m.timings, duration)
	} else {
		m.timings[m.position-1] = duration
	}

	if !looped {
		m.Unlock()
		return
	}

	stats := m.getStats()
	m.Unlock()

	log.Printf("%s", stats)
}
1159915
func (d Duration) Time(unit Duration, bpm int) time.Duration {
	val := (60.0 / float64(bpm)) / (float64(d.Value) / 4.0) / (float64(unit.Value) / 4.0)

	for i := 0; i < d.Dots; i++ {
		val += val / 2.0
	}

	if d.Triplet {
		val = val / 3.0
	}

	return time.Duration(val * ns)
}
602022
func (r *Response) Duration() *Number {
	if r.rtt == nil {
		return &Number{r.chain, 0}
	}
	return &Number{r.chain, float64(*r.rtt)}
}
1100373
func (s *Sample) Duration() time.Duration {
	return s.End.Sub(s.Start)
}
340066
func (b *BaseKvdb) GetLockTimeout() time.Duration {
	b.lock.Lock()
	defer b.lock.Unlock()
	return b.LockTimeout
}
33814
func (a Accuracy) Duration() time.Duration {
	return 0 +
		time.Duration(a.Seconds)*time.Second +
		time.Duration(a.Millis)*time.Millisecond +
		time.Duration(a.Micros)*time.Microsecond
}
660766
func (t *Timeline) GetEvent() string {
	if t == nil || t.Event == nil {
		return ""
	}
	return *t.Event
}
417668
func (d Duration) Duration() (time.Duration, error) {
	switch {
	case byte(d) == 0x00:
		return time.Duration(0), nil
	case byte(d) <= 0x7F:
		return time.Duration(d) * time.Second, nil
	case d <= 0xFD:
		return time.Duration(d-0x7F) * time.Minute, nil
	}
	return time.Duration(0), fmt.Errorf("Factory default duration")
}
525585
func Duration(name string, value time.Duration, usage string) *time.Duration {
	return CommandLine.Duration(name, value, usage)
}
810828
func (d *Decoder) Duration() (time.Duration, error) {
	if d == nil || d.parser == nil {
		return 0, errors.New("can't calculate the duration of a nil pointer")
	}
	return d.parser.Duration()
}
1299731
func (c *Client) Time(stat string, rate float64, f func()) error {
	ts := time.Now()
	f()
	return c.Duration(stat, time.Since(ts), rate)
}
491386
func DurationChange(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "durationchange", Listener: listener}
}