type time.Duration
436 uses
time (current package)
format.go#L1621: func ParseDuration(s string) (Duration, error) {
format.go#L1712: return -Duration(d), nil
format.go#L1717: return Duration(d), nil
sleep.go#L14: func Sleep(d Duration)
sleep.go#L52: func when(d Duration) int64 {
sleep.go#L143: func NewTimer(d Duration) *Timer {
sleep.go#L171: func (t *Timer) Reset(d Duration) bool {
sleep.go#L187: case c.(chan Time) <- Now().Add(Duration(-delta)):
sleep.go#L202: func After(d Duration) <-chan Time {
sleep.go#L210: func AfterFunc(d Duration, f func()) *Timer {
tick.go#L36: func NewTicker(d Duration) *Ticker {
tick.go#L65: func (t *Ticker) Reset(d Duration) {
tick.go#L86: func Tick(d Duration) <-chan Time {
time.go#L911: type Duration int64
time.go#L914: minDuration Duration = -1 << 63
time.go#L915: maxDuration Duration = 1<<63 - 1
time.go#L931: Nanosecond Duration = 1
time.go#L943: func (d Duration) String() string {
time.go#L953: func (d Duration) format(buf *[32]byte) int {
time.go#L1068: func (d Duration) Nanoseconds() int64 { return int64(d) }
time.go#L1071: func (d Duration) Microseconds() int64 { return int64(d) / 1e3 }
time.go#L1074: func (d Duration) Milliseconds() int64 { return int64(d) / 1e6 }
time.go#L1086: func (d Duration) Seconds() float64 {
time.go#L1093: func (d Duration) Minutes() float64 {
time.go#L1100: func (d Duration) Hours() float64 {
time.go#L1108: func (d Duration) Truncate(m Duration) Duration {
time.go#L1117: func lessThanHalf(x, y Duration) bool {
time.go#L1127: func (d Duration) Round(m Duration) Duration {
time.go#L1154: func (d Duration) Abs() Duration {
time.go#L1166: func (t Time) Add(d Duration) Time {
time.go#L1194: func (t Time) Sub(u Time) Duration {
time.go#L1198: d := Duration(t.sec()-u.sec())*Second + Duration(t.nsec()-u.nsec())
time.go#L1210: func subMono(t, u int64) Duration {
time.go#L1211: d := Duration(t - u)
time.go#L1223: func Since(t Time) Duration {
time.go#L1233: func Until(t Time) Duration {
time.go#L1775: func (t Time) Truncate(d Duration) Time {
time.go#L1792: func (t Time) Round(d Duration) Time {
time.go#L1807: func div(t Time, d Duration) (qmod2 int, r Duration) {
time.go#L1826: r = Duration(nsec % int32(d))
time.go#L1832: r = Duration(sec%d1)*Second + Duration(nsec)
time.go#L1879: r = Duration(u0)
context
context.go#L694: func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
context.go#L701: func WithTimeoutCause(parent Context, timeout time.Duration, cause error) (Context, CancelFunc) {
crypto/tls
handshake_client_tls13.go#L867: lifetime := time.Duration(msg.lifetime) * time.Second
flag
flag.go#L278: type durationValue time.Duration
flag.go#L280: func newDurationValue(val time.Duration, p *time.Duration) *durationValue {
flag.go#L294: func (d *durationValue) Get() any { return time.Duration(*d) }
flag.go#L296: func (d *durationValue) String() string { return (*time.Duration)(d).String() }
flag.go#L931: func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string) {
flag.go#L938: func DurationVar(p *time.Duration, name string, value time.Duration, usage string) {
flag.go#L945: func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration {
flag.go#L946: p := new(time.Duration)
flag.go#L954: func Duration(name string, value time.Duration, usage string) *time.Duration {
github.com/golang/protobuf/ptypes
duration.go#L26: func Duration(dur *durationpb.Duration) (time.Duration, error) {
duration.go#L30: d := time.Duration(dur.Seconds) * time.Second
duration.go#L35: d += time.Duration(dur.Nanos) * time.Nanosecond
duration.go#L46: func DurationProto(d time.Duration) *durationpb.Duration {
github.com/robfig/cron/v3
constantdelay.go#L8: Delay time.Duration
constantdelay.go#L14: func Every(duration time.Duration) ConstantDelaySchedule {
constantdelay.go#L19: Delay: duration - time.Duration(duration.Nanoseconds())%time.Second,
constantdelay.go#L26: return t.Add(schedule.Delay - time.Duration(t.Nanosecond())*time.Nanosecond)
spec.go#L82: t = t.Add(1*time.Second - time.Duration(t.Nanosecond())*time.Nanosecond)
spec.go#L127: t = t.Add(time.Duration(24-t.Hour()) * time.Hour)
spec.go#L129: t = t.Add(time.Duration(-t.Hour()) * time.Hour)
go.pact.im/x/clock
clock.go#L30: Schedule(d time.Duration, f func(now time.Time)) Event
clock.go#L52: Reset(d time.Duration) bool
clock.go#L70: func (c *Clock) Schedule(d time.Duration, f func(now time.Time)) Event {
runtime.go#L29: func (c *runtimeClock) Schedule(d time.Duration, f func(now time.Time)) Event {
runtime.go#L41: func (c *runtimeClock) Timer(d time.Duration) Timer {
runtime.go#L46: func (c *runtimeClock) Ticker(d time.Duration) Ticker {
runtime.go#L61: func (r runtimeTimer) Reset(d time.Duration) {
ticker.go#L18: Ticker(d time.Duration) Ticker
ticker.go#L32: Reset(d time.Duration)
ticker.go#L43: func (c *Clock) Ticker(d time.Duration) Ticker {
ticker.go#L65: resetc chan time.Duration
ticker.go#L72: func newEventTicker(c *Clock, d time.Duration) *eventTicker {
ticker.go#L76: resetc: make(chan time.Duration),
ticker.go#L94: func (t *eventTicker) Reset(d time.Duration) {
ticker.go#L101: func (t *eventTicker) start(d time.Duration) {
ticker.go#L109: func (t *eventTicker) run(d time.Duration) {
ticker.go#L135: func (t *eventTicker) reset(d time.Duration) {
timer.go#L12: Timer(d time.Duration) Timer
timer.go#L60: Reset(d time.Duration)
timer.go#L68: func (c *Clock) Timer(d time.Duration) Timer {
timer.go#L104: func (t *eventTimer) Reset(d time.Duration) {
go.pact.im/x/clock/fakeclock
fakeclock.go#L23: next(now time.Time) (time.Duration, bool)
fakeclock.go#L60: func Y2038(d time.Duration) *Clock {
fakeclock.go#L112: func (c *Clock) Add(d time.Duration) time.Time {
fakeclock.go#L139: func (c *Clock) Schedule(d time.Duration, f func(now time.Time)) clock.Event {
fakeclock.go#L149: func (c *Clock) Timer(d time.Duration) clock.Timer {
fakeclock.go#L161: func (c *Clock) Ticker(d time.Duration) clock.Ticker {
fakeclock.go#L188: func (c *Clock) reset(m moment, d time.Duration, dp *time.Duration) bool {
fakeclock.go#L259: func (t *event) Reset(d time.Duration) bool {
fakeclock.go#L264: func (t *event) next(now time.Time) (time.Duration, bool) {
fakeclock.go#L286: func (t *timer) Reset(d time.Duration) {
fakeclock.go#L291: func (t *timer) next(now time.Time) (time.Duration, bool) {
fakeclock.go#L303: d time.Duration
fakeclock.go#L317: func (t *ticker) Reset(d time.Duration) {
fakeclock.go#L325: func (t *ticker) next(now time.Time) (time.Duration, bool) {
go.pact.im/x/clock/mockclock
mockclock.go#L58: func (m *MockClock) Schedule(d time.Duration, f func(time.Time)) clock.Event {
mockclock.go#L72: func (m *MockClock) Ticker(d time.Duration) clock.Ticker {
mockclock.go#L86: func (m *MockClock) Timer(d time.Duration) clock.Timer {
ticker.go#L57: func (m *MockTicker) Reset(d time.Duration) {
timer.go#L57: func (m *MockTimer) Reset(d time.Duration) {
go.pact.im/x/clock/observeclock
observeclock.go#L44: func (c *Clock) Schedule(d time.Duration, f func(time.Time)) clock.Event {
observeclock.go#L51: func (c *Clock) Timer(d time.Duration) clock.Timer {
observeclock.go#L58: func (c *Clock) Ticker(d time.Duration) clock.Ticker {
go.pact.im/x/flaky
backoff.go#L17: type Backoff func(n uint) (time.Duration, bool)
backoff.go#L28: return func(n uint) (time.Duration, bool) {
backoff.go#L39: func Constant(xs ...time.Duration) Backoff {
backoff.go#L40: return func(n uint) (time.Duration, bool) {
backoff.go#L57: func Exp2(unit time.Duration) Backoff {
backoff.go#L58: return func(n uint) (time.Duration, bool) {
deadline.go#L9: func withinDeadline(ctx context.Context, d time.Duration) bool {
debounce.go#L30: w time.Duration
debounce.go#L44: func Debounce(t time.Duration) *DebounceExecutor {
debounce.go#L74: func (d *DebounceExecutor) WithWait(t time.Duration) *DebounceExecutor {
jitter.go#L15: type Jitter func(v JitterInterval) time.Duration
jitter.go#L23: return func(v JitterInterval) time.Duration {
jitter.go#L28: func randomJitter(v JitterInterval, f func(n int64) int64) time.Duration {
jitter.go#L48: return time.Duration(n)
jitter.go#L56: L time.Duration
jitter.go#L102: return func(n uint) (time.Duration, bool) {
schedule.go#L53: d time.Duration
schedule.go#L61: func Midnight(d time.Duration, loc *time.Location) Schedule {
schedule.go#L90: d time.Duration
schedule.go#L96: func Sleep(d time.Duration) Schedule {
go.pact.im/x/supervisor
restart.go#L62: func (m *Supervisor[K, P]) restart(ctx context.Context, wait time.Duration) error {
go.pact.im/x/zapjournal
encoder.go#L134: func (e *varsEncoder) AddDuration(key string, value time.Duration) {
json.go#L147: func (e *jsonEncoder) AddDuration(k string, v time.Duration) {
json.go#L152: func (e *jsonEncoder) AppendDuration(v time.Duration) {
json.go#L157: func (e *jsonEncoder) encodeDuration(v time.Duration) {
go.pact.im/x/zapjournal/tests
stubs.go#L29: func (*fakeClock) NewTicker(time.Duration) *time.Ticker {
go.uber.org/atomic
duration.go#L37: var _zeroDuration time.Duration
duration.go#L40: func NewDuration(val time.Duration) *Duration {
duration.go#L49: func (x *Duration) Load() time.Duration {
duration.go#L50: return time.Duration(x.v.Load())
duration.go#L54: func (x *Duration) Store(val time.Duration) {
duration.go#L61: func (x *Duration) CAS(old, new time.Duration) (swapped bool) {
duration.go#L66: func (x *Duration) CompareAndSwap(old, new time.Duration) (swapped bool) {
duration.go#L72: func (x *Duration) Swap(val time.Duration) (old time.Duration) {
duration.go#L73: return time.Duration(x.v.Swap(int64(val)))
duration.go#L83: var v time.Duration
duration_ext.go#L28: func (d *Duration) Add(delta time.Duration) time.Duration {
duration_ext.go#L29: return time.Duration(d.v.Add(int64(delta)))
duration_ext.go#L33: func (d *Duration) Sub(delta time.Duration) time.Duration {
duration_ext.go#L34: return time.Duration(d.v.Sub(int64(delta)))
go.uber.org/goleak
options.go#L43: maxSleep time.Duration
options.go#L110: func maxSleep(d time.Duration) Option {
options.go#L153: d := time.Duration(int(time.Microsecond) << uint(i))
go.uber.org/zap
array.go#L58: func Durations(key string, ds []time.Duration) Field {
array.go#L178: type durations []time.Duration
field.go#L382: func Duration(key string, val time.Duration) Field {
field.go#L388: func Durationp(key string, val *time.Duration) Field {
field.go#L534: case time.Duration:
field.go#L536: case *time.Duration:
field.go#L538: case []time.Duration:
go.uber.org/zap/zapcore
buffered_write_syncer.go#L94: FlushInterval time.Duration
clock.go#L36: NewTicker(time.Duration) *time.Ticker
clock.go#L46: func (systemClock) NewTicker(duration time.Duration) *time.Ticker {
encoder.go#L222: type DurationEncoder func(time.Duration, PrimitiveArrayEncoder)
encoder.go#L225: func SecondsDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) {
encoder.go#L231: func NanosDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) {
encoder.go#L237: func MillisDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) {
encoder.go#L243: func StringDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) {
encoder.go#L360: AddDuration(key string, value time.Duration)
encoder.go#L395: AppendDuration(time.Duration)
field.go#L135: enc.AddDuration(f.Key, time.Duration(f.Integer))
json_encoder.go#L138: func (enc *jsonEncoder) AddDuration(key string, val time.Duration) {
json_encoder.go#L269: func (enc *jsonEncoder) AppendDuration(val time.Duration) {
memory_encoder.go#L69: func (m MapObjectEncoder) AddDuration(k string, v time.Duration) { m.cur[k] = v }
memory_encoder.go#L164: func (s *sliceArrayEncoder) AppendDuration(v time.Duration) { s.elems = append(s.elems, v) }
sampler.go#L65: func (c *counter) IncCheckReset(t time.Time, tick time.Duration) uint64 {
sampler.go#L153: func NewSamplerWithOptions(core Core, tick time.Duration, first, thereafter int, opts ...SamplerOption) Core {
sampler.go#L173: tick time.Duration
sampler.go#L196: func NewSampler(core Core, tick time.Duration, first, thereafter int) Core {
golang.org/x/net/http2
config.go#L35: SendPingTimeout time.Duration
config.go#L36: PingTimeout time.Duration
config.go#L37: WriteByteTimeout time.Duration
http2.go#L261: byteTimeout time.Duration // immutable, WriteByteTimeout
http2.go#L264: func newBufferedWriter(group synctestGroupInterface, conn net.Conn, timeout time.Duration) *bufferedWriter {
http2.go#L323: func writeWithByteTimeout(group synctestGroupInterface, conn net.Conn, timeout time.Duration, p []byte) (n int, err error) {
http2.go#L427: NewTimer(d time.Duration) timer
http2.go#L428: AfterFunc(d time.Duration, f func()) timer
http2.go#L429: ContextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc)
server.go#L134: IdleTimeout time.Duration
server.go#L139: ReadIdleTimeout time.Duration
server.go#L144: PingTimeout time.Duration
server.go#L150: WriteByteTimeout time.Duration
server.go#L199: func (s *Server) newTimer(d time.Duration) timer {
server.go#L207: func (s *Server) afterFunc(d time.Duration, f func()) timer {
server.go#L643: readIdleTimeout time.Duration
server.go#L644: pingTimeout time.Duration
server.go#L1514: func (sc *serverConn) shutDownIn(d time.Duration) {
timer.go#L11: Reset(d time.Duration) bool
transport.go#L153: IdleConnTimeout time.Duration
transport.go#L161: ReadIdleTimeout time.Duration
transport.go#L166: PingTimeout time.Duration
transport.go#L171: WriteByteTimeout time.Duration
transport.go#L212: func (t *Transport) timeSince(when time.Time) time.Duration {
transport.go#L220: func (t *Transport) newTimer(d time.Duration) timer {
transport.go#L228: func (t *Transport) afterFunc(d time.Duration, f func()) timer {
transport.go#L235: func (t *Transport) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) {
transport.go#L368: idleTimeout time.Duration // or 0 for never
transport.go#L399: readIdleTimeout time.Duration
transport.go#L400: pingTimeout time.Duration
transport.go#L546: timeout time.Duration
transport.go#L652: d := time.Second * time.Duration(backoff)
transport.go#L810: func (t *Transport) expectContinueTimeout() time.Duration {
transport.go#L1278: func (cc *ClientConn) responseHeaderTimeout() time.Duration {
transport.go#L3198: func (t *Transport) idleConnTimeout() time.Duration {
golang.org/x/net/internal/timeseries
timeseries.go#L19: var timeSeriesResolutions = []time.Duration{
timeseries.go#L32: var minuteHourSeriesResolutions = []time.Duration{
timeseries.go#L92: size time.Duration // duration of the bucketed Observable
timeseries.go#L109: func (l *tsLevel) InitLevel(size time.Duration, numBuckets int, f func() Observable) {
timeseries.go#L136: func (ts *timeSeries) init(resolutions []time.Duration, f func() Observable, numBuckets int, clock Clock) {
timeseries.go#L237: if !t.Before(level.end.Add(level.size * time.Duration(ts.numBuckets))) {
timeseries.go#L338: func (ts *timeSeries) Recent(delta time.Duration) Observable {
timeseries.go#L368: if !start.Before(l.end.Add(-l.size * time.Duration(ts.numBuckets))) {
timeseries.go#L384: func (ts *timeSeries) RecentList(delta time.Duration, num int) []Observable {
timeseries.go#L398: dstInterval := finish.Sub(start) / time.Duration(num)
timeseries.go#L400: srcStart := l.end.Add(-srcInterval * time.Duration(ts.numBuckets))
timeseries.go#L408: srcStart = srcStart.Add(time.Duration(advance) * srcInterval)
golang.org/x/net/trace
events.go#L27: MaxErrAge time.Duration
events.go#L190: func (f *eventFamily) Count(now time.Time, maxErrAge time.Duration) (n int) {
events.go#L201: func (f *eventFamily) Copy(now time.Time, maxErrAge time.Duration) (els eventLogs) {
events.go#L231: Elapsed time.Duration // since previous event in log
events.go#L284: func (el *eventLog) hasRecentError(now time.Time, maxErrAge time.Duration) bool {
events.go#L296: func (el *eventLog) delta(t time.Time) (time.Duration, bool) {
trace.go#L661: type minCond time.Duration
trace.go#L663: func (m minCond) match(t *trace) bool { return t.Elapsed >= time.Duration(m) }
trace.go#L664: func (m minCond) String() string { return fmt.Sprintf("≥%gs", time.Duration(m).Seconds()) }
trace.go#L688: Elapsed time.Duration // since previous event in trace
trace.go#L729: Elapsed time.Duration // Elapsed time for this trace, zero while active.
trace.go#L768: func (tr *trace) delta(t time.Time) (time.Duration, bool) {
trace.go#L934: func elapsed(d time.Duration) string {
golang.org/x/sys/unix
syscall_linux.go#L2523: func MakeItimerval(interval, value time.Duration) Itimerval {
google.golang.org/grpc
backoff.go#L43: MaxDelay time.Duration
backoff.go#L60: MinConnectTimeout time.Duration
dialoptions.go#L64: timeout time.Duration
dialoptions.go#L75: minConnectTimeout func() time.Duration
dialoptions.go#L250: o.minConnectTimeout = func() time.Duration {
dialoptions.go#L260: func WithBackoffMaxDelay(md time.Duration) DialOption {
dialoptions.go#L373: func WithTimeout(d time.Duration) DialOption {
dialoptions.go#L400: func WithDialer(f func(string, time.Duration) (net.Conn, error)) DialOption {
dialoptions.go#L618: func withMinConnectDeadline(f func() time.Duration) DialOption {
server.go#L173: connectionTimeout time.Duration
server.go#L509: func ConnectionTimeout(d time.Duration) ServerOption {
server.go#L821: var tempDelay time.Duration // how long to sleep on accept failure
service_config.go#L132: func parseDuration(s *string) (*time.Duration, error) {
service_config.go#L146: var d time.Duration
service_config.go#L152: d = time.Duration(i) * time.Second
service_config.go#L166: d += time.Duration(f)
stream.go#L665: var dur time.Duration
stream.go#L667: dur = time.Millisecond * time.Duration(pushback)
stream.go#L675: dur = time.Duration(grpcrand.Int63n(int64(cur)))
trace.go#L60: deadline time.Duration // may be zero
google.golang.org/grpc/backoff
backoff.go#L32: BaseDelay time.Duration
backoff.go#L39: MaxDelay time.Duration
google.golang.org/grpc/internal/backoff
backoff.go#L37: Backoff(retries int) time.Duration
backoff.go#L54: func (bc Exponential) Backoff(retries int) time.Duration {
backoff.go#L72: return time.Duration(backoff)
google.golang.org/grpc/internal/binarylog
method_logger.go#L157: Timeout time.Duration
google.golang.org/grpc/internal/grpcutil
encode_duration.go#L30: func div(d, r time.Duration) int64 {
encode_duration.go#L41: func EncodeDuration(t time.Duration) string {
google.golang.org/grpc/internal/serviceconfig
serviceconfig.go#L139: Timeout *time.Duration
serviceconfig.go#L169: InitialBackoff time.Duration
serviceconfig.go#L170: MaxBackoff time.Duration
google.golang.org/grpc/internal/syscall
syscall_linux.go#L71: func SetTCPUserTimeout(conn net.Conn, timeout time.Duration) error {
google.golang.org/grpc/internal/transport
defaults.go#L31: infinity = time.Duration(math.MaxInt64)
handler_server.go#L131: timeout time.Duration
http2_client.go#L1651: func minTime(a, b time.Duration) time.Duration {
http2_client.go#L1665: timeoutLeft := time.Duration(0)
http2_client.go#L1678: timer.Reset(time.Duration(lastRead) + t.kp.Time - time.Duration(time.Now().UnixNano()))
http2_server.go#L393: timeout time.Duration
http2_server.go#L1126: kpTimeoutLeft := time.Duration(0)
http2_server.go#L1182: kpTimer.Reset(time.Duration(lastRead) + t.kp.Time - time.Duration(time.Now().UnixNano()))
http2_server.go#L1438: func getJitter(v time.Duration) time.Duration {
http2_server.go#L1445: return time.Duration(j)
http_util.go#L180: func timeoutUnitToDuration(u timeoutUnit) (d time.Duration, ok bool) {
http_util.go#L199: func decodeTimeout(s string) (time.Duration, error) {
http_util.go#L220: return time.Duration(math.MaxInt64), nil
http_util.go#L222: return d * time.Duration(t), nil
transport.go#L533: ConnectionTimeout time.Duration
google.golang.org/grpc/keepalive
keepalive.go#L37: Time time.Duration // The current default value is infinity.
keepalive.go#L41: Timeout time.Duration // The current default value is 20 seconds.
keepalive.go#L55: MaxConnectionIdle time.Duration // The current default value is infinity.
keepalive.go#L60: MaxConnectionAge time.Duration // The current default value is infinity.
keepalive.go#L63: MaxConnectionAgeGrace time.Duration // The current default value is infinity.
keepalive.go#L67: Time time.Duration // The current default value is 2 hours.
keepalive.go#L71: Timeout time.Duration // The current default value is 20 seconds.
keepalive.go#L80: MinTime time.Duration // The current default value is 5 minutes.
google.golang.org/protobuf/types/known/durationpb
duration.pb.go#L167: func New(d time.Duration) *Duration {
duration.pb.go#L176: func (x *Duration) AsDuration() time.Duration {
duration.pb.go#L179: d := time.Duration(secs) * time.Second
duration.pb.go#L180: overflow := d/time.Second != time.Duration(secs)
duration.pb.go#L181: d += time.Duration(nanos) * time.Nanosecond
duration.pb.go#L187: return time.Duration(math.MinInt64)
duration.pb.go#L189: return time.Duration(math.MaxInt64)
internal/profile
profile.go#L303: ss = append(ss, fmt.Sprintf("Duration: %v", time.Duration(p.DurationNanos)))
net
dial.go#L138: Timeout time.Duration
dial.go#L169: FallbackDelay time.Duration
dial.go#L181: KeepAlive time.Duration
dial.go#L278: timeout := timeRemaining / time.Duration(addrsRemaining)
dial.go#L291: func (d *Dialer) fallbackDelay() time.Duration {
dial.go#L484: func DialTimeout(network, address string, timeout time.Duration) (Conn, error) {
dial.go#L762: KeepAlive time.Duration
dnsclient_unix.go#L169: func (r *Resolver) exchange(ctx context.Context, server string, q dnsmessage.Question, timeout time.Duration, useTCP, ad bool) (dnsmessage.Parser, dnsmessage.Header, error) {
dnsconfig.go#L35: timeout time.Duration // wait before giving up on a query, including retries
dnsconfig_unix.go#L92: conf.timeout = time.Duration(n) * time.Second
tcpsock.go#L139: Idle time.Duration
tcpsock.go#L143: Interval time.Duration
tcpsock.go#L249: func (c *TCPConn) SetKeepAlivePeriod(d time.Duration) error {
tcpsock.go#L289: func newTCPConn(fd *netFD, keepAliveIdle time.Duration, keepAliveCfg KeepAliveConfig, preKeepAliveHook func(*netFD), keepAliveHook func(KeepAliveConfig)) *TCPConn {
tcpsock.go#L466: func roundDurationUp(d time.Duration, to time.Duration) time.Duration {
tcpsockopt_unix.go#L15: func setKeepAliveIdle(fd *netFD, d time.Duration) error {
tcpsockopt_unix.go#L29: func setKeepAliveInterval(fd *netFD, d time.Duration) error {
net/http
client.go#L105: Timeout time.Duration
h2_bundle.go#L1060: SendPingTimeout time.Duration
h2_bundle.go#L1061: PingTimeout time.Duration
h2_bundle.go#L1062: WriteByteTimeout time.Duration
h2_bundle.go#L3738: byteTimeout time.Duration // immutable, WriteByteTimeout
h2_bundle.go#L3741: func http2newBufferedWriter(group http2synctestGroupInterface, conn net.Conn, timeout time.Duration) *http2bufferedWriter {
h2_bundle.go#L3800: func http2writeWithByteTimeout(group http2synctestGroupInterface, conn net.Conn, timeout time.Duration, p []byte) (n int, err error) {
h2_bundle.go#L3925: NewTimer(d time.Duration) http2timer
h2_bundle.go#L3926: AfterFunc(d time.Duration, f func()) http2timer
h2_bundle.go#L3927: ContextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc)
h2_bundle.go#L4181: IdleTimeout time.Duration
h2_bundle.go#L4186: ReadIdleTimeout time.Duration
h2_bundle.go#L4191: PingTimeout time.Duration
h2_bundle.go#L4197: WriteByteTimeout time.Duration
h2_bundle.go#L4246: func (s *http2Server) newTimer(d time.Duration) http2timer {
h2_bundle.go#L4254: func (s *http2Server) afterFunc(d time.Duration, f func()) http2timer {
h2_bundle.go#L4690: readIdleTimeout time.Duration
h2_bundle.go#L4691: pingTimeout time.Duration
h2_bundle.go#L5565: func (sc *http2serverConn) shutDownIn(d time.Duration) {
h2_bundle.go#L7451: Reset(d time.Duration) bool
h2_bundle.go#L7575: IdleConnTimeout time.Duration
h2_bundle.go#L7583: ReadIdleTimeout time.Duration
h2_bundle.go#L7588: PingTimeout time.Duration
h2_bundle.go#L7593: WriteByteTimeout time.Duration
h2_bundle.go#L7634: func (t *http2Transport) timeSince(when time.Time) time.Duration {
h2_bundle.go#L7642: func (t *http2Transport) newTimer(d time.Duration) http2timer {
h2_bundle.go#L7650: func (t *http2Transport) afterFunc(d time.Duration, f func()) http2timer {
h2_bundle.go#L7657: func (t *http2Transport) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) {
h2_bundle.go#L7790: idleTimeout time.Duration // or 0 for never
h2_bundle.go#L7820: readIdleTimeout time.Duration
h2_bundle.go#L7821: pingTimeout time.Duration
h2_bundle.go#L7967: timeout time.Duration
h2_bundle.go#L8074: d := time.Second * time.Duration(backoff)
h2_bundle.go#L8232: func (t *http2Transport) expectContinueTimeout() time.Duration {
h2_bundle.go#L8714: func (cc *http2ClientConn) responseHeaderTimeout() time.Duration {
h2_bundle.go#L10879: func (t *http2Transport) idleConnTimeout() time.Duration {
http.go#L270: SendPingTimeout time.Duration
http.go#L275: PingTimeout time.Duration
http.go#L280: WriteByteTimeout time.Duration
server.go#L934: func (s *Server) tlsHandshakeTimeout() time.Duration {
server.go#L935: var ret time.Duration
server.go#L936: for _, v := range [...]time.Duration{
server.go#L2984: ReadTimeout time.Duration
server.go#L2992: ReadHeaderTimeout time.Duration
server.go#L2999: WriteTimeout time.Duration
server.go#L3005: IdleTimeout time.Duration
server.go#L3152: nextPollInterval := func() time.Duration {
server.go#L3154: interval := pollIntervalBase + time.Duration(rand.Intn(int(pollIntervalBase/10)))
server.go#L3420: var tempDelay time.Duration // how long to sleep on accept failure
server.go#L3597: func (s *Server) idleTimeout() time.Duration {
server.go#L3604: func (s *Server) readHeaderTimeout() time.Duration {
server.go#L3777: func TimeoutHandler(h Handler, dt time.Duration, msg string) Handler {
server.go#L3792: dt time.Duration
transport.go#L185: TLSHandshakeTimeout time.Duration
transport.go#L224: IdleConnTimeout time.Duration
transport.go#L230: ResponseHeaderTimeout time.Duration
transport.go#L239: ExpectContinueTimeout time.Duration
net/http/httptrace
trace.go#L254: IdleTime time.Duration
net/http/httputil
reverseproxy.go#L171: FlushInterval time.Duration
reverseproxy.go#L596: func (p *ReverseProxy) flushInterval(res *http.Response) time.Duration {
reverseproxy.go#L613: func (p *ReverseProxy) copyResponse(dst http.ResponseWriter, src io.Reader, flushInterval time.Duration) error {
reverseproxy.go#L684: latency time.Duration // non-zero; negative means to flush immediately
net/http/pprof
pprof.go#L116: func sleep(r *http.Request, d time.Duration) {
pprof.go#L126: timeout := srv.WriteTimeout + time.Duration(seconds*float64(time.Second))
pprof.go#L163: sleep(r, time.Duration(sec)*time.Second)
pprof.go#L189: sleep(r, time.Duration(sec*float64(time.Second)))
pprof.go#L300: t := time.NewTimer(time.Duration(sec) * time.Second)
os
exec.go#L368: func (p *ProcessState) UserTime() time.Duration {
exec.go#L373: func (p *ProcessState) SystemTime() time.Duration {
exec_unix.go#L167: func (p *ProcessState) userTime() time.Duration {
exec_unix.go#L168: return time.Duration(p.rusage.Utime.Nano()) * time.Nanosecond
exec_unix.go#L171: func (p *ProcessState) systemTime() time.Duration {
exec_unix.go#L172: return time.Duration(p.rusage.Stime.Nano()) * time.Nanosecond
os/exec
exec.go#L302: WaitDelay time.Duration
runtime/debug
garbage.go#L17: PauseTotal time.Duration // total pause for all collections
garbage.go#L18: Pause []time.Duration // pause history, most recent first
garbage.go#L20: PauseQuantiles []time.Duration
garbage.go#L39: stats.Pause = make([]time.Duration, 2*maxPause+3)
stubs.go#L12: func readGCStats(*[]time.Duration)
testing
benchmark.go#L39: d time.Duration
benchmark.go#L100: previousDuration time.Duration // total duration of the previous run
benchmark.go#L364: func (b *B) Elapsed() time.Duration {
benchmark.go#L520: T time.Duration // The total time taken.
benchmark.go#L862: r.T += time.Duration(other.NsPerOp())
example.go#L64: func (eg *InternalExample) processRunResult(stdout string, timeSpent time.Duration, finished bool, recovered any) (passed bool) {
fuzz.go#L433: T time.Duration // The total time taken.
testing.go#L502: timeout *time.Duration
testing.go#L653: duration time.Duration
testing.go#L908: func fmtDuration(d time.Duration) string {
testing.go#L1316: nextSleep += time.Duration(rand.Int63n(int64(nextSleep)))
testing.go#L1955: func (f matchStringOnly) CoordinateFuzzing(time.Duration, int64, time.Duration, int64, int, []corpusEntry, []reflect.Type, string, string) error {
testing.go#L2011: CoordinateFuzzing(time.Duration, int64, time.Duration, int64, int, []corpusEntry, []reflect.Type, string, string) error
testing_other.go#L29: func highPrecisionTimeSince(b highPrecisionTime) time.Duration {