// durationToTimespec prepares a timeout value
2488
func durationToTimespec(d time.Duration) unix.Timespec {
	return unix.NsecToTimespec(d.Nanoseconds())
}
63342
func Timeout(duration time.Duration) ReporterOption {
	return func(r *httpReporter) { r.client.Timeout = duration }
}
118547
func Duration(names []string, value time.Duration, usage string) *time.Duration {
	return CommandLine.Duration(names, value, usage)
}
1278635
func (c *client) Duration(key string, fallback time.Duration) time.Duration {
	if d, err := time.ParseDuration(c.Getenv(key)); err == nil {
		return d
	}

	return fallback
}
136921
func (c *challengeHTTP) Timeout() (timeout, interval time.Duration) {
	return 60 * time.Second, 5 * time.Second
}
1100373
func (s *Sample) Duration() time.Duration {
	return s.End.Sub(s.Start)
}
423141
func (r Range) Duration() time.Duration {
	return r.End.Sub(r.Start)
}
1138998
func (p *parserMixin) DurationVar(target *time.Duration) {
	p.SetValue(newDurationValue(target))
}
695523
func (s *Service) stopTimeout(timeout int) int {
	DEFAULTTIMEOUT := 10
	if timeout != 0 {
		return timeout
	}
	configTimeout := utils.DurationStrToSecondsInt(s.Config().StopGracePeriod)
	if configTimeout != nil {
		return *configTimeout
	}
	return DEFAULTTIMEOUT
}
313576
func DurationToString(d time.Duration) string {
	minutes := int(d.Minutes()) % 60
	hours := int(d.Hours())
	days := hours / 24
	hours = hours % 24
	if days > 0 {
		return fmt.Sprintf("%dd %dhr", days, hours)
	}
	if hours > 0 {
		return fmt.Sprintf("%dhr %dm", hours, minutes)
	}
	return fmt.Sprintf("%dm", minutes)
}
558850
func Timeout(d time.Duration) ConfigOpt {
	return func(c *Config) {
		c.transport.ResponseHeaderTimeout = d
		c.transport.TLSHandshakeTimeout = d
		c.dialer.Timeout = d
	}
}
1139675
func (c *Client) TimeInMilliseconds(name string, value float64, tags []string, rate float64) error {
	return c.send(name, value, timingSuffix, tags, rate)
}
494757
func Timeout(d time.Duration) Option {
	return QueryParam(
		"timeoutSeconds",
		strconv.FormatInt(int64(d/time.Second), 10),
	)
}
240829
func (stats *LogStats) TotalTime() time.Duration {
	return stats.EndTime.Sub(stats.StartTime)
}
1352721
func (s *NoopClient) TimingDuration(stat string, delta time.Duration, rate float32) error {
	return nil
}
374930
func toTime(s string) (t time.Time, err error) {
	if s != "" {
		t, err = time.Parse(time.RFC3339, s)
	}

	return
}
534312
func Timeout(d time.Duration) func(*Attacker) {
	return func(a *Attacker) {
		a.client.Timeout = d
	}
}