type time.Duration
574 uses
time (current package)
format.go#L1374: func ParseDuration(s string) (Duration, error) {
format.go#L1469: return Duration(d), nil
sleep.go#L9: func Sleep(d Duration)
sleep.go#L28: func when(d Duration) int64 {
sleep.go#L86: func NewTimer(d Duration) *Timer {
sleep.go#L134: func (t *Timer) Reset(d Duration) bool {
sleep.go#L160: func After(d Duration) <-chan Time {
sleep.go#L167: func AfterFunc(d Duration, f func()) *Timer {
tick.go#L22: func NewTicker(d Duration) *Ticker {
tick.go#L52: func (t *Ticker) Reset(d Duration) {
tick.go#L64: func Tick(d Duration) <-chan Time {
time.go#L583: type Duration int64
time.go#L586: minDuration Duration = -1 << 63
time.go#L587: maxDuration Duration = 1<<63 - 1
time.go#L602: Nanosecond Duration = 1
time.go#L614: func (d Duration) String() string {
time.go#L729: func (d Duration) Nanoseconds() int64 { return int64(d) }
time.go#L732: func (d Duration) Microseconds() int64 { return int64(d) / 1e3 }
time.go#L735: func (d Duration) Milliseconds() int64 { return int64(d) / 1e6 }
time.go#L747: func (d Duration) Seconds() float64 {
time.go#L754: func (d Duration) Minutes() float64 {
time.go#L761: func (d Duration) Hours() float64 {
time.go#L769: func (d Duration) Truncate(m Duration) Duration {
time.go#L778: func lessThanHalf(x, y Duration) bool {
time.go#L788: func (d Duration) Round(m Duration) Duration {
time.go#L813: func (t Time) Add(d Duration) Time {
time.go#L841: func (t Time) Sub(u Time) Duration {
time.go#L845: d := Duration(te - ue)
time.go#L854: d := Duration(t.sec()-u.sec())*Second + Duration(t.nsec()-u.nsec())
time.go#L868: func Since(t Time) Duration {
time.go#L881: func Until(t Time) Duration {
time.go#L1403: func (t Time) Truncate(d Duration) Time {
time.go#L1420: func (t Time) Round(d Duration) Time {
time.go#L1435: func div(t Time, d Duration) (qmod2 int, r Duration) {
time.go#L1454: r = Duration(nsec % int32(d))
time.go#L1460: r = Duration(sec%d1)*Second + Duration(nsec)
time.go#L1507: r = Duration(u0)
archive/zip
struct.go#L206: func timeZone(offset time.Duration) *time.Location {
cloud.google.com/go/internal
retry.go#L35: sleep func(context.Context, time.Duration) error) error {
cloud.google.com/go/internal/optional
optional.go#L98: func ToDuration(v Duration) time.Duration {
optional.go#L99: x, ok := v.(time.Duration)
cloud.google.com/go/logging
logging.go#L353: func DelayThreshold(d time.Duration) LoggerOption { return delayThreshold(d) }
logging.go#L355: type delayThreshold time.Duration
logging.go#L357: func (d delayThreshold) set(l *Logger) { l.bundler.DelayThreshold = time.Duration(d) }
logging.go#L639: Latency time.Duration
cloud.google.com/go/profiler
heap.go#L57: func deltaAllocProfile(ctx context.Context, duration time.Duration, forceGC bool, prof *bytes.Buffer) error {
profiler.go#L279: func abortedBackoffDuration(md grpcmd.MD) (time.Duration, error) {
profiler.go#L303: func (r *retryer) Retry(err error) (time.Duration, bool) {
profiler.go#L430: func deltaMutexProfile(ctx context.Context, duration time.Duration, prof *bytes.Buffer) error {
cloud.google.com/go/storage
bucket.go#L379: RetentionPeriod time.Duration
bucket.go#L588: MaxAge time.Duration
bucket.go#L905: RetentionPeriod: time.Duration(rp.RetentionPeriod) * time.Second,
bucket.go#L928: MaxAge: time.Duration(v.MaxAgeSeconds) * time.Second,
context
context.go#L502: func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
contrib.go.opencensus.io/exporter/stackdriver
metrics_batcher.go#L50: func newMetricsBatcher(ctx context.Context, projectID string, numWorkers int, mc *monitoring.MetricClient, timeout time.Duration) *metricsBatcher {
metrics_batcher.go#L179: timeout time.Duration
metrics_batcher.go#L196: timeout time.Duration) *worker {
stackdriver.go#L119: BundleDelayThreshold time.Duration
stackdriver.go#L256: Timeout time.Duration
stackdriver.go#L260: ReportingInterval time.Duration
stackdriver.go#L480: func newContextWithTimeout(ctx context.Context, timeout time.Duration) (context.Context, func()) {
contrib.go.opencensus.io/integrations/ocsql
dbstats_go1.11.go#L16: func RecordStats(db *sql.DB, interval time.Duration) (fnStop func()) {
crypto/tls
handshake_client_tls13.go#L651: lifetime := time.Duration(msg.lifetime) * time.Second
database/sql
sql.go#L429: maxLifetime time.Duration // maximum amount of time a connection may be reused
sql.go#L430: maxIdleTime time.Duration // maximum amount of time a connection may be idle before being closed
sql.go#L484: func (dc *driverConn) expired(timeout time.Duration) bool {
sql.go#L871: func (db *DB) shortestIdleTimeLocked() time.Duration {
sql.go#L948: func (db *DB) SetConnMaxLifetime(d time.Duration) {
sql.go#L970: func (db *DB) SetConnMaxIdleTime(d time.Duration) {
sql.go#L996: func (db *DB) connectionCleaner(d time.Duration) {
sql.go#L1080: WaitDuration time.Duration // The total time blocked waiting for a new connection.
sql.go#L1101: WaitDuration: time.Duration(wait),
flag
flag.go#L261: type durationValue time.Duration
flag.go#L263: func newDurationValue(val time.Duration, p *time.Duration) *durationValue {
flag.go#L277: func (d *durationValue) Get() interface{} { return time.Duration(*d) }
flag.go#L279: func (d *durationValue) String() string { return (*time.Duration)(d).String() }
flag.go#L812: func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string) {
flag.go#L819: func DurationVar(p *time.Duration, name string, value time.Duration, usage string) {
flag.go#L826: func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration {
flag.go#L827: p := new(time.Duration)
flag.go#L835: func Duration(name string, value time.Duration, usage string) *time.Duration {
github.com/aws/aws-sdk-go/aws
config.go#L222: SleepDelay func(time.Duration)
config.go#L423: func (c *Config) WithSleepDelay(fn func(time.Duration)) *Config {
context_sleep.go#L12: func SleepWithContext(ctx Context, dur time.Duration) error {
github.com/aws/aws-sdk-go/aws/client
default_retryer.go#L23: MinRetryDelay time.Duration
default_retryer.go#L27: MinThrottleDelay time.Duration
default_retryer.go#L31: MaxRetryDelay time.Duration
default_retryer.go#L35: MaxThrottleDelay time.Duration
default_retryer.go#L78: func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration {
default_retryer.go#L91: var initialDelay time.Duration
default_retryer.go#L110: var delay time.Duration
default_retryer.go#L115: delay = time.Duration(1<default_retryer.go#L126: func getJitterDelay(duration time.Duration) time.Duration {
default_retryer.go#L127: return time.Duration(sdkrand.SeededRand.Int63n(int64(duration)) + int64(duration))
default_retryer.go#L148: func getRetryAfterDelay(r *request.Request) (time.Duration, bool) {
default_retryer.go#L163: return time.Duration(delay) * time.Second, true
no_op_retryer.go#L26: func (d NoOpRetryer) RetryRules(_ *request.Request) time.Duration {
github.com/aws/aws-sdk-go/aws/credentials
credentials.go#L175: func (e *Expiry) SetExpiration(expiration time.Time, window time.Duration) {
github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds
ec2_role_provider.go#L54: ExpiryWindow time.Duration
github.com/aws/aws-sdk-go/aws/credentials/endpointcreds
provider.go#L68: ExpiryWindow time.Duration
github.com/aws/aws-sdk-go/aws/credentials/processcreds
provider.go#L142: DefaultDuration = time.Duration(15) * time.Minute
provider.go#L149: DefaultTimeout = time.Duration(1) * time.Minute
provider.go#L160: Duration time.Duration
provider.go#L171: ExpiryWindow time.Duration
provider.go#L182: Timeout time.Duration
provider.go#L204: func NewCredentialsTimeout(command string, timeout time.Duration) *credentials.Credentials {
github.com/aws/aws-sdk-go/aws/credentials/stscreds
assume_role_provider.go#L128: var DefaultDuration = time.Duration(15) * time.Minute
assume_role_provider.go#L160: Duration time.Duration
assume_role_provider.go#L232: ExpiryWindow time.Duration
assume_role_provider.go#L310: jitter := time.Duration(sdkrand.SeededRand.Float64() * p.MaxJitterFrac * float64(p.Duration))
web_identity_provider.go#L60: Duration time.Duration
web_identity_provider.go#L66: ExpiryWindow time.Duration
github.com/aws/aws-sdk-go/aws/csm
metric.go#L13: ns := time.Duration(time.Time(t).UnixNano())
github.com/aws/aws-sdk-go/aws/ec2metadata
api.go#L19: func (c *EC2Metadata) getToken(ctx aws.Context, duration time.Duration) (tokenOutput, error) {
service.go#L173: TTL time.Duration
service.go#L202: t := time.Duration(i) * time.Second
token_provider.go#L21: configuredTTL time.Duration
token_provider.go#L32: func newTokenProvider(c *EC2Metadata, duration time.Duration) *tokenProvider {
github.com/aws/aws-sdk-go/aws/request
request.go#L66: RetryDelay time.Duration
request.go#L84: ExpireTime time.Duration
request.go#L315: func (r *Request) Presign(expire time.Duration) (string, error) {
request.go#L341: func (r *Request) PresignRequest(expire time.Duration) (string, http.Header, error) {
request.go#L351: func getPresignedURL(r *Request, expire time.Duration) (string, http.Header, error) {
retryer.go#L23: RetryRules(*Request) time.Duration
retryer.go#L71: func (d noOpRetryer) RetryRules(_ *Request) time.Duration {
timeout_read_closer.go#L25: duration time.Duration
timeout_read_closer.go#L75: func WithResponseReadTimeout(duration time.Duration) Option {
waiter.go#L34: type WaiterDelay func(attempt int) time.Duration
waiter.go#L39: func ConstantWaiterDelay(delay time.Duration) WaiterDelay {
waiter.go#L40: return func(attempt int) time.Duration {
waiter.go#L84: SleepWithContext func(aws.Context, time.Duration) error
github.com/aws/aws-sdk-go/aws/session
session.go#L226: AssumeRoleDuration time.Duration
shared_config.go#L82: AssumeRoleDuration *time.Duration
shared_config.go#L281: d := time.Duration(section.Int(roleDurationSecondsKey)) * time.Second
github.com/aws/aws-sdk-go/aws/signer/v4
v4.go#L232: ExpireTime time.Duration
v4.go#L310: func (v4 Signer) Presign(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) {
v4.go#L314: func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, isPresign bool, signTime time.Time) (http.Header, error) {
github.com/evanw/esbuild/pkg/api
serve_other.go#L87: func (h *apiHandler) notifyRequest(duration time.Duration, req *http.Request, status int) {
github.com/go-git/go-git/v5/utils/diff
diff.go#L32: func DoWithTimeout (src, dst string, timeout time.Duration) (diffs []diffmatchpatch.Diff) {
github.com/go-redis/redis/v8
cluster.go#L64: MinRetryBackoff time.Duration
cluster.go#L65: MaxRetryBackoff time.Duration
cluster.go#L67: DialTimeout time.Duration
cluster.go#L68: ReadTimeout time.Duration
cluster.go#L69: WriteTimeout time.Duration
cluster.go#L74: MaxConnAge time.Duration
cluster.go#L75: PoolTimeout time.Duration
cluster.go#L76: IdleTimeout time.Duration
cluster.go#L77: IdleCheckFrequency time.Duration
cluster.go#L200: time.Sleep(time.Duration(10+rand.Intn(10)) * time.Millisecond)
cluster.go#L211: func (n *clusterNode) Latency() time.Duration {
cluster.go#L213: return time.Duration(latency) * time.Microsecond
cluster.go#L1049: func (c *ClusterClient) reaper(idleCheckFrequency time.Duration) {
cluster.go#L1553: func (c *ClusterClient) retryBackoff(attempt int) time.Duration {
command.go#L22: readTimeout() *time.Duration
command.go#L110: _readTimeout *time.Duration
command.go#L158: func (cmd *baseCmd) readTimeout() *time.Duration {
command.go#L162: func (cmd *baseCmd) setReadTimeout(d time.Duration) {
command.go#L496: val time.Duration
command.go#L497: precision time.Duration
command.go#L502: func NewDurationCmd(ctx context.Context, precision time.Duration, args ...interface{}) *DurationCmd {
command.go#L512: func (cmd *DurationCmd) Val() time.Duration {
command.go#L516: func (cmd *DurationCmd) Result() (time.Duration, error) {
command.go#L534: cmd.val = time.Duration(n)
command.go#L536: cmd.val = time.Duration(n) * cmd.precision
command.go#L1307: Idle time.Duration
command.go#L1371: Idle: time.Duration(idle) * time.Millisecond,
command.go#L2176: Duration time.Duration
command.go#L2241: costsDuration := time.Duration(costs) * time.Microsecond
commands.go#L12: func usePrecise(dur time.Duration) bool {
commands.go#L16: func formatMs(ctx context.Context, dur time.Duration) int64 {
commands.go#L28: func formatSec(ctx context.Context, dur time.Duration) int64 {
commands.go#L85: Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
commands.go#L88: Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd
commands.go#L94: PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd
commands.go#L100: Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
commands.go#L101: RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd
commands.go#L120: Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd
commands.go#L121: SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
commands.go#L122: SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd
commands.go#L155: BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
commands.go#L156: BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd
commands.go#L157: BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd
commands.go#L217: BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
commands.go#L218: BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd
commands.go#L263: ClientPause(ctx context.Context, dur time.Duration) *BoolCmd
commands.go#L366: func (c cmdable) Wait(ctx context.Context, numSlaves int, timeout time.Duration) *IntCmd {
commands.go#L461: func (c cmdable) Expire(ctx context.Context, key string, expiration time.Duration) *BoolCmd {
commands.go#L479: func (c cmdable) Migrate(ctx context.Context, host, port, key string, db int, timeout time.Duration) *StatusCmd {
commands.go#L524: func (c cmdable) PExpire(ctx context.Context, key string, expiration time.Duration) *BoolCmd {
commands.go#L565: func (c cmdable) Restore(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd {
commands.go#L577: func (c cmdable) RestoreReplace(ctx context.Context, key string, ttl time.Duration, value string) *StatusCmd {
commands.go#L759: func (c cmdable) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd {
commands.go#L779: func (c cmdable) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd {
commands.go#L798: func (c cmdable) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd {
commands.go#L1087: func (c cmdable) BLPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd {
commands.go#L1100: func (c cmdable) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *StringSliceCmd {
commands.go#L1113: func (c cmdable) BRPopLPush(ctx context.Context, source, destination string, timeout time.Duration) *StringCmd {
commands.go#L1481: Block time.Duration
commands.go#L1551: Block time.Duration
commands.go#L1620: MinIdle time.Duration
commands.go#L1693: func (c cmdable) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd {
commands.go#L1707: func (c cmdable) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd {
commands.go#L2169: func (c cmdable) ClientPause(ctx context.Context, dur time.Duration) *BoolCmd {
options.go#L64: MinRetryBackoff time.Duration
options.go#L67: MaxRetryBackoff time.Duration
options.go#L71: DialTimeout time.Duration
options.go#L75: ReadTimeout time.Duration
options.go#L79: WriteTimeout time.Duration
options.go#L89: MaxConnAge time.Duration
options.go#L93: PoolTimeout time.Duration
options.go#L97: IdleTimeout time.Duration
options.go#L102: IdleCheckFrequency time.Duration
pubsub.go#L368: func (c *PubSub) ReceiveTimeout(ctx context.Context, timeout time.Duration) (interface{}, error) {
pubsub.go#L631: func (c *PubSub) retryBackoff(attempt int) time.Duration {
redis.go#L138: func (c *baseClient) withTimeout(timeout time.Duration) *baseClient {
redis.go#L338: func (c *baseClient) retryBackoff(attempt int) time.Duration {
redis.go#L342: func (c *baseClient) cmdTimeout(cmd Cmder) time.Duration {
redis.go#L547: func (c *Client) WithTimeout(timeout time.Duration) *Client {
result.go#L38: func NewDurationResult(val time.Duration, err error) *DurationCmd {
ring.go#L56: HeartbeatFrequency time.Duration
ring.go#L75: MinRetryBackoff time.Duration
ring.go#L76: MaxRetryBackoff time.Duration
ring.go#L78: DialTimeout time.Duration
ring.go#L79: ReadTimeout time.Duration
ring.go#L80: WriteTimeout time.Duration
ring.go#L84: MaxConnAge time.Duration
ring.go#L85: PoolTimeout time.Duration
ring.go#L86: IdleTimeout time.Duration
ring.go#L87: IdleCheckFrequency time.Duration
ring.go#L309: func (c *ringShards) Heartbeat(frequency time.Duration) {
ring.go#L462: func (c *Ring) retryBackoff(attempt int) time.Duration {
sentinel.go#L49: MinRetryBackoff time.Duration
sentinel.go#L50: MaxRetryBackoff time.Duration
sentinel.go#L52: DialTimeout time.Duration
sentinel.go#L53: ReadTimeout time.Duration
sentinel.go#L54: WriteTimeout time.Duration
sentinel.go#L58: MaxConnAge time.Duration
sentinel.go#L59: PoolTimeout time.Duration
sentinel.go#L60: IdleTimeout time.Duration
sentinel.go#L61: IdleCheckFrequency time.Duration
universal.go#L31: MinRetryBackoff time.Duration
universal.go#L32: MaxRetryBackoff time.Duration
universal.go#L34: DialTimeout time.Duration
universal.go#L35: ReadTimeout time.Duration
universal.go#L36: WriteTimeout time.Duration
universal.go#L40: MaxConnAge time.Duration
universal.go#L41: PoolTimeout time.Duration
universal.go#L42: IdleTimeout time.Duration
universal.go#L43: IdleCheckFrequency time.Duration
github.com/go-redis/redis/v8/internal
internal.go#L9: func RetryBackoff(retry int, minBackoff, maxBackoff time.Duration) time.Duration {
internal.go#L18: d = minBackoff + time.Duration(rand.Int63n(int64(d)))
util.go#L13: func Sleep(ctx context.Context, dur time.Duration) error {
github.com/go-redis/redis/v8/internal/pool
conn.go#L64: func (cn *Conn) WithReader(ctx context.Context, timeout time.Duration, fn func(rd *proto.Reader) error) error {
conn.go#L77: ctx context.Context, timeout time.Duration, fn func(wr *proto.Writer) error,
conn.go#L106: func (cn *Conn) deadline(ctx context.Context, timeout time.Duration) time.Time {
pool.go#L59: MaxConnAge time.Duration
pool.go#L60: PoolTimeout time.Duration
pool.go#L61: IdleTimeout time.Duration
pool.go#L62: IdleCheckFrequency time.Duration
pool.go#L448: func (p *ConnPool) reaper(frequency time.Duration) {
github.com/go-redis/redis_rate/v9
rate.go#L24: Period time.Duration
rate.go#L35: func fmtDur(d time.Duration) string {
rate.go#L161: func dur(f float64) time.Duration {
rate.go#L165: return time.Duration(f * float64(time.Second))
rate.go#L184: RetryAfter time.Duration
rate.go#L191: ResetAfter time.Duration
github.com/golang-migrate/migrate/v4
migrate.go#L82: LockTimeout time.Duration
github.com/golang/protobuf/ptypes
duration.go#L24: func Duration(dur *durationpb.Duration) (time.Duration, error) {
duration.go#L28: d := time.Duration(dur.Seconds) * time.Second
duration.go#L33: d += time.Duration(dur.Nanos) * time.Nanosecond
duration.go#L42: func DurationProto(d time.Duration) *durationpb.Duration {
github.com/google/go-cmp/cmp/cmpopts
equate.go#L97: func EquateApproxTime(margin time.Duration) cmp.Option {
equate.go#L110: margin time.Duration
github.com/google/pprof/profile
profile.go#L536: ss = append(ss, fmt.Sprintf("Duration: %.4v", time.Duration(p.DurationNanos)))
github.com/googleapis/gax-go/v2
call_option.go#L52: Retry(err error) (pause time.Duration, shouldRetry bool)
call_option.go#L83: func (r *boRetryer) Retry(err error) (time.Duration, bool) {
call_option.go#L103: Initial time.Duration
call_option.go#L106: Max time.Duration
call_option.go#L113: cur time.Duration
call_option.go#L117: func (bo *Backoff) Pause() time.Duration {
call_option.go#L134: d := time.Duration(1 + rand.Int63n(int64(bo.cur)))
call_option.go#L135: bo.cur = time.Duration(float64(bo.cur) * bo.Multiplier)
invoke.go#L53: func Sleep(ctx context.Context, d time.Duration) error {
invoke.go#L64: type sleeper func(ctx context.Context, d time.Duration) error
github.com/jackc/pgconn
config.go#L38: ConnectTimeout time.Duration
config.go#L687: func parseConnectTimeoutSetting(s string) (time.Duration, error) {
config.go#L695: return time.Duration(timeout) * time.Second, nil
config.go#L698: func makeConnectTimeoutDialFunc(timeout time.Duration) DialFunc {
github.com/jackc/pgtype
interval.go#L43: case time.Duration:
interval.go#L70: case *time.Duration:
interval.go#L72: *v = time.Duration(us) * time.Microsecond
github.com/lib/pq
conn.go#L92: DialTimeout(network, address string, timeout time.Duration) (net.Conn, error)
conn.go#L107: func (d defaultDialer) DialTimeout(network, address string, timeout time.Duration) (net.Conn, error) {
conn.go#L343: duration := time.Duration(seconds) * time.Second
notify.go#L408: minReconnectInterval time.Duration
notify.go#L409: maxReconnectInterval time.Duration
notify.go#L438: minReconnectInterval time.Duration,
notify.go#L439: maxReconnectInterval time.Duration,
notify.go#L447: minReconnectInterval time.Duration,
notify.go#L448: maxReconnectInterval time.Duration,
github.com/prometheus/client_golang/prometheus
go_collector.go#L35: msMaxWait time.Duration // Wait time for fresh memstats.
go_collector.go#L36: msMaxAge time.Duration // Maximum allowed age of old memstats.
go_collector.go#L320: stats.PauseQuantiles = make([]time.Duration, 5)
summary.go#L69: DefMaxAge time.Duration = 10 * time.Minute
summary.go#L124: MaxAge time.Duration
summary.go#L227: streamDuration: opts.MaxAge / time.Duration(opts.AgeBuckets),
summary.go#L266: streamDuration time.Duration
timer.go#L48: func (t *Timer) ObserveDuration() time.Duration {
github.com/prometheus/client_golang/prometheus/promhttp
http.go#L320: Timeout time.Duration
github.com/prometheus/common/model
time.go#L84: func (t Time) Add(d time.Duration) Time {
time.go#L89: func (t Time) Sub(o Time) time.Duration {
time.go#L90: return time.Duration(t-o) * minimumTick
time.go#L170: type Duration time.Duration
time.go#L195: dur = time.Duration(n) * time.Millisecond
time.go#L220: ms = int64(time.Duration(d) / time.Millisecond)
github.com/prometheus/procfs
mountstats.go#L75: Age time.Duration
github.com/sergi/go-diff/diffmatchpatch
diffmatchpatch.go#L19: DiffTimeout time.Duration
go.opencensus.io/internal
traceinternals.go#L45: MinLatency, MaxLatency time.Duration
go.opencensus.io/metric/metricexport
reader.go#L66: ReportingInterval time.Duration
go.opencensus.io/stats/view
worker.go#L85: SetReportingPeriod(time.Duration)
worker.go#L220: func SetReportingPeriod(d time.Duration) {
worker.go#L231: func (w *worker) SetReportingPeriod(d time.Duration) {
worker_commands.go#L174: d time.Duration
go.opencensus.io/trace
spanbucket.go#L26: var defaultLatencies = [...]time.Duration{
spanbucket.go#L109: func latencyBucket(latency time.Duration) int {
spanbucket.go#L122: func latencyBucketBounds(index int) (lower time.Duration, upper time.Duration) {
spanstore.go#L146: func (i internalOnly) ReportSpansByLatency(name string, minLatency, maxLatency time.Duration) []*SpanData {
go.opencensus.io/zpages
rpcz.go#L176: AvgLatencyMinute time.Duration
rpcz.go#L177: AvgLatencyHour time.Duration
rpcz.go#L178: AvgLatencyTotal time.Duration
rpcz.go#L218: convertTime := func(ms float64) time.Duration {
rpcz.go#L222: return time.Duration(float64(time.Millisecond) * ms)
templates.go#L90: func msFormatter(d time.Duration) string {
tracez.go#L47: defaultLatencies = [...]time.Duration{
tracez.go#L338: ReportSpansByLatency(name string, minLatency, maxLatency time.Duration) []*trace.SpanData
tracez.go#L345: var min, max time.Duration
golang.org/x/crypto/openpgp/packet
signature.go#L463: expiry := sig.CreationTime.Add(time.Duration(*sig.KeyLifetimeSecs) * time.Second)
golang.org/x/crypto/ssh
client.go#L237: Timeout time.Duration
golang.org/x/crypto/ssh/agent
keyring.go#L174: t := time.Now().Add(time.Duration(key.LifetimeSecs) * time.Second)
golang.org/x/net/context
go17.go#L62: func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
golang.org/x/net/http2
server.go#L114: IdleTimeout time.Duration
server.go#L1329: func (sc *serverConn) shutDownIn(d time.Duration) {
transport.go#L117: ReadIdleTimeout time.Duration
transport.go#L122: PingTimeout time.Duration
transport.go#L147: func (t *Transport) pingTimeout() time.Duration {
transport.go#L240: idleTimeout time.Duration // or 0 for never
transport.go#L488: case <-time.After(time.Second * time.Duration(backoff)):
transport.go#L629: func (t *Transport) expectContinueTimeout() time.Duration {
transport.go#L987: func (cc *ClientConn) responseHeaderTimeout() time.Duration {
transport.go#L2596: delay time.Duration // how long we should delay a delayed write for
transport.go#L2700: 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/oauth2/google
google.go#L200: Expiry: time.Now().Add(time.Duration(res.ExpiresInSec) * time.Second),
golang.org/x/oauth2/internal
token.go#L70: return time.Now().Add(time.Duration(v) * time.Second)
token.go#L265: token.Expiry = time.Now().Add(time.Duration(expires) * time.Second)
golang.org/x/oauth2/jwt
jwt.go#L63: Expires time.Duration
jwt.go#L168: token.Expiry = time.Now().Add(time.Duration(secs) * time.Second)
golang.org/x/pkgsite/cmd/worker
main.go#L147: middleware.Timeout(time.Duration(timeout)*time.Minute),
main.go#L169: func getRedis(ctx context.Context, host, port string, writeTimeout, readTimeout time.Duration) *redis.Client {
main.go#L173: var dialTimeout time.Duration
golang.org/x/pkgsite/internal/cache
cache.go#L41: func (c *Cache) Put(ctx context.Context, key string, data []byte, ttl time.Duration) (err error) {
golang.org/x/pkgsite/internal/frontend
fetch.go#L336: func pollForPath(ctx context.Context, db *postgres.DB, pollEvery time.Duration,
fetch.go#L337: fullPath, modulePath, requestedVersion string, taskIDChangeInterval time.Duration) *fetchResult {
fetch.go#L371: fullPath, modulePath, requestedVersion string, taskIDChangeInterval time.Duration) (fr *fetchResult) {
fetch.go#L591: func recordFrontendFetchMetric(ctx context.Context, status int, latency time.Duration) {
server.go#L43: taskIDChangeInterval time.Duration
server.go#L65: TaskIDChangeInterval time.Duration
server.go#L189: func detailsTTL(r *http.Request) time.Duration {
server.go#L199: func detailsTTLForPath(ctx context.Context, urlPath, tab string) time.Duration {
golang.org/x/pkgsite/internal/middleware
caching.go#L75: func recordCacheResult(ctx context.Context, name string, hit bool, latency time.Duration) {
caching.go#L99: type Expirer func(r *http.Request) time.Duration
caching.go#L102: func TTL(ttl time.Duration) Expirer {
caching.go#L103: return func(r *http.Request) time.Duration {
caching.go#L192: func (c *cache) put(ctx context.Context, key string, rec *cacheRecorder, ttl time.Duration) {
experiment.go#L40: func NewExperimenter(ctx context.Context, pollEvery time.Duration, getter ExperimentGetter, rep Reporter) (_ *Experimenter, err error) {
timeout.go#L15: func Timeout(d time.Duration) Middleware {
golang.org/x/pkgsite/internal/poller
poller.go#L39: func (p *Poller) Start(ctx context.Context, period time.Duration) {
golang.org/x/pkgsite/internal/postgres
search.go#L79: Latency time.Duration
golang.org/x/pkgsite/internal/source
source.go#L215: func NewClient(timeout time.Duration) *Client {
golang.org/x/pkgsite/internal/worker
fetch.go#L39: timings map[string]time.Duration
fetch.go#L172: timings: map[string]time.Duration{},
metrics.go#L54: func recordProcessingLag(ctx context.Context, d time.Duration) {
server.go#L652: "timeSince": func(t time.Time) time.Duration {
server.go#L655: "timeSub": func(t1, t2 time.Time) time.Duration {
google.golang.org/api/idtoken
cache.go#L118: return c.now().Add(time.Duration(maxAge-age) * time.Second)
google.golang.org/api/internal/gensupport
resumable.go#L22: Pause() time.Duration
resumable.go#L182: var pause time.Duration
send.go#L123: var pause time.Duration
google.golang.org/api/support/bundler
bundler.go#L60: DelayThreshold time.Duration
google.golang.org/grpc
backoff.go#L43: MaxDelay time.Duration
backoff.go#L57: MinConnectTimeout time.Duration
dialoptions.go#L54: timeout time.Duration
dialoptions.go#L66: minConnectTimeout func() time.Duration
dialoptions.go#L72: resolveNowBackoff func(int) time.Duration
dialoptions.go#L245: o.minConnectTimeout = func() time.Duration {
dialoptions.go#L255: func WithBackoffMaxDelay(md time.Duration) DialOption {
dialoptions.go#L353: func WithTimeout(d time.Duration) DialOption {
dialoptions.go#L380: func WithDialer(f func(string, time.Duration) (net.Conn, error)) DialOption {
dialoptions.go#L579: func withMinConnectDeadline(f func() time.Duration) DialOption {
dialoptions.go#L589: func withResolveNowBackoff(f func(int) time.Duration) DialOption {
server.go#L144: connectionTimeout time.Duration
server.go#L409: func ConnectionTimeout(d time.Duration) ServerOption {
server.go#L717: var tempDelay time.Duration // how long to sleep on accept failure
service_config.go#L53: Timeout *time.Duration
service_config.go#L145: initialBackoff time.Duration
service_config.go#L146: maxBackoff time.Duration
service_config.go#L183: func parseDuration(s *string) (*time.Duration, error) {
service_config.go#L197: var d time.Duration
service_config.go#L203: d = time.Duration(i) * time.Second
service_config.go#L217: d += time.Duration(f)
stream.go#L556: var dur time.Duration
stream.go#L558: dur = time.Millisecond * time.Duration(pushback)
stream.go#L566: 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/balancer/grpclb
grpclb.go#L55: func convertDuration(d *durationpb.Duration) time.Duration {
grpclb.go#L59: return time.Duration(d.Seconds)*time.Second + time.Duration(d.Nanos)*time.Nanosecond
grpclb.go#L115: func newLBBuilderWithFallbackTimeout(fallbackTimeout time.Duration) balancer.Builder {
grpclb.go#L122: fallbackTimeout time.Duration
grpclb.go#L181: fallbackTimeout time.Duration
grpclb.go#L371: func (lb *lbBalancer) fallbackToBackendsAfter(fallbackTimeout time.Duration) {
grpclb_remote_balancer.go#L289: func (ccw *remoteBalancerCCWrapper) sendLoadReport(s *balanceLoadClientStream, interval time.Duration) {
grpclb_util.go#L99: timeout 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#L144: 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/syscall
syscall_nonlinux.go#L66: 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#L119: timeout time.Duration
http2_client.go#L1342: func minTime(a, b time.Duration) time.Duration {
http2_client.go#L1356: timeoutLeft := time.Duration(0)
http2_client.go#L1369: timer.Reset(time.Duration(lastRead) + t.kp.Time - time.Duration(time.Now().UnixNano()))
http2_server.go#L961: kpTimeoutLeft := time.Duration(0)
http2_server.go#L1017: kpTimer.Reset(time.Duration(lastRead) + t.kp.Time - time.Duration(time.Now().UnixNano()))
http2_server.go#L1260: func getJitter(v time.Duration) time.Duration {
http2_server.go#L1267: return time.Duration(j)
http_util.go#L118: timeout time.Duration
http_util.go#L398: func timeoutUnitToDuration(u timeoutUnit) (d time.Duration, ok bool) {
http_util.go#L417: func decodeTimeout(s string) (time.Duration, error) {
http_util.go#L438: return time.Duration(math.MaxInt64), nil
http_util.go#L440: return d * time.Duration(t), nil
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)
gopkg.in/yaml.v2
decode.go#L240: durationType = reflect.TypeOf(time.Duration(0))
encode.go#L172: e.stringv(tag, reflect.ValueOf(iface.(time.Duration).String()))
net
dial.go#L40: Timeout time.Duration
dial.go#L71: FallbackDelay time.Duration
dial.go#L80: KeepAlive time.Duration
dial.go#L146: timeout := timeRemaining / time.Duration(addrsRemaining)
dial.go#L159: func (d *Dialer) fallbackDelay() time.Duration {
dial.go#L332: func DialTimeout(network, address string, timeout time.Duration) (Conn, error) {
dial.go#L615: KeepAlive time.Duration
dnsclient_unix.go#L139: func (r *Resolver) exchange(ctx context.Context, server string, q dnsmessage.Question, timeout time.Duration, useTCP bool) (dnsmessage.Parser, dnsmessage.Header, error) {
dnsconfig_unix.go#L27: timeout time.Duration // wait before giving up on a query, including retries
dnsconfig_unix.go#L111: conf.timeout = time.Duration(n) * time.Second
hook.go#L25: testHookSetKeepAlive = func(time.Duration) {}
tcpsock.go#L169: func (c *TCPConn) SetKeepAlivePeriod(d time.Duration) error {
tcpsock.go#L342: func roundDurationUp(d time.Duration, to time.Duration) time.Duration {
tcpsockopt_darwin.go#L16: func setKeepAlivePeriod(fd *netFD, d time.Duration) error {
net/http
client.go#L105: Timeout time.Duration
h2_bundle.go#L3680: IdleTimeout time.Duration
h2_bundle.go#L4898: func (sc *http2serverConn) shutDownIn(d time.Duration) {
h2_bundle.go#L6619: ReadIdleTimeout time.Duration
h2_bundle.go#L6624: PingTimeout time.Duration
h2_bundle.go#L6649: func (t *http2Transport) pingTimeout() time.Duration {
h2_bundle.go#L6742: idleTimeout time.Duration // or 0 for never
h2_bundle.go#L6991: case <-time.After(time.Second * time.Duration(backoff)):
h2_bundle.go#L7132: func (t *http2Transport) expectContinueTimeout() time.Duration {
h2_bundle.go#L7490: func (cc *http2ClientConn) responseHeaderTimeout() time.Duration {
h2_bundle.go#L9100: delay time.Duration // how long we should delay a delayed write for
h2_bundle.go#L9204: func (t *http2Transport) idleConnTimeout() time.Duration {
server.go#L2576: ReadTimeout time.Duration
server.go#L2584: ReadHeaderTimeout time.Duration
server.go#L2590: WriteTimeout time.Duration
server.go#L2596: IdleTimeout time.Duration
server.go#L2742: nextPollInterval := func() time.Duration {
server.go#L2744: interval := pollIntervalBase + time.Duration(rand.Intn(int(pollIntervalBase/10)))
server.go#L2977: var tempDelay time.Duration // how long to sleep on accept failure
server.go#L3096: func (s *Server) idleTimeout() time.Duration {
server.go#L3103: func (s *Server) readHeaderTimeout() time.Duration {
server.go#L3266: func TimeoutHandler(h Handler, dt time.Duration, msg string) Handler {
server.go#L3281: dt time.Duration
transport.go#L172: TLSHandshakeTimeout time.Duration
transport.go#L211: IdleConnTimeout time.Duration
transport.go#L217: ResponseHeaderTimeout time.Duration
transport.go#L226: ExpectContinueTimeout time.Duration
net/http/httptrace
trace.go#L254: IdleTime time.Duration
net/http/httputil
reverseproxy.go#L64: FlushInterval time.Duration
reverseproxy.go#L400: func (p *ReverseProxy) flushInterval(res *http.Response) time.Duration {
reverseproxy.go#L417: func (p *ReverseProxy) copyResponse(dst io.Writer, src io.Reader, flushInterval time.Duration) error {
reverseproxy.go#L491: latency time.Duration // non-zero; negative means to flush immediately
os
exec.go#L139: func (p *ProcessState) UserTime() time.Duration {
exec.go#L144: func (p *ProcessState) SystemTime() time.Duration {
exec_unix.go#L100: func (p *ProcessState) userTime() time.Duration {
exec_unix.go#L101: return time.Duration(p.rusage.Utime.Nano()) * time.Nanosecond
exec_unix.go#L104: func (p *ProcessState) systemTime() time.Duration {
exec_unix.go#L105: return time.Duration(p.rusage.Stime.Nano()) * time.Nanosecond
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#L47: return time.Duration(f.d).String()
benchmark.go#L99: previousDuration time.Duration // total duration of the previous run
benchmark.go#L353: T time.Duration // The total time taken.
benchmark.go#L682: r.T += time.Duration(other.NsPerOp())
example.go#L67: func (eg *InternalExample) processRunResult(stdout string, timeSpent time.Duration, finished bool, recovered interface{}) (passed bool) {
testing.go#L325: timeout *time.Duration
testing.go#L411: duration time.Duration
testing.go#L624: func fmtDuration(d time.Duration) string {
 |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |