type time.Duration
145 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)
context
context.go#L502: func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
crypto/tls
handshake_client_tls13.go#L651: lifetime := time.Duration(msg.lifetime) * time.Second
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 {
go.etcd.io/bbolt
bolt_unix.go#L13: func flock(db *DB, exclusive bool, timeout time.Duration) error {
db.go#L116: MaxBatchDelay time.Duration
db.go#L1023: Timeout time.Duration
tx.go#L679: RebalanceTime time.Duration // total time spent rebalancing
tx.go#L684: SpillTime time.Duration // total time spent spilling
tx.go#L688: WriteTime time.Duration // total time spent writing to disk
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
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)
src.elv.sh/pkg/cli/prompt
prompt.go#L35: StaleThreshold func() time.Duration
prompt.go#L60: cfg.StaleThreshold = func() time.Duration { return defaultStaleThreshold }
src.elv.sh/pkg/cli/term
file_reader_unix.go#L41: func (r *bReader) ReadByteWithTimeout(timeout time.Duration) (byte, error) {
read_rune.go#L10: ReadByteWithTimeout(timeout time.Duration) (byte, error)
read_rune.go#L19: func readRune(rd byteReaderWithTimeout, timeout time.Duration) (rune, error) {
src.elv.sh/pkg/edit
prompt.go#L81: StaleThreshold: func() time.Duration {
prompt.go#L83: return time.Duration(seconds * float64(time.Second))
src.elv.sh/pkg/eval
builtin_fn_misc.go#L350: var TimeAfter = func(fm *Frame, d time.Duration) <-chan time.Time {
builtin_fn_misc.go#L396: var d time.Duration
builtin_fn_misc.go#L400: d = time.Duration(float64(time.Second) * duration)
builtin_fn_misc.go#L404: d = time.Duration(float64(time.Second) * f)
src.elv.sh/pkg/sys
select_unix.go#L11: func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout time.Duration) error {
waitforread_unix.go#L13: func WaitForRead(timeout time.Duration, files ...*os.File) (ready []bool, err error) {
src.elv.sh/pkg/testutil
scaled_ms.go#L14: func ScaledMs(ms int) time.Duration {
scaled_ms.go#L15: return 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 {