func time.Now
236 uses
time (current package)
sleep.go#L149: case c.(chan Time) <- Now():
time.go#L874: now = Now()
time.go#L887: now = Now()
time.go#L1066: func Now() Time {
cloud.google.com/go/logging
logging.go#L93: var now = time.Now
cloud.google.com/go/storage
storage.go#L521: return time.Now().UTC()
context
context.go#L503: return WithDeadline(parent, time.Now().Add(timeout))
contrib.go.opencensus.io/integrations/ocsql
observability.go#L159: startTime := time.Now()
crypto/rand
rand_unix.go#L152: ns := time.Now().UnixNano()
crypto/tls
common.go#L922: t = time.Now
conn.go#L1360: c.SetWriteDeadline(time.Now().Add(time.Second * 5))
conn.go#L1364: c.SetWriteDeadline(time.Now())
crypto/x509
verify.go#L593: now = time.Now()
database/sql
sql.go#L39: var nowFunc = time.Now
github.com/aws/aws-sdk-go/aws/corehandlers
handlers.go#L77: if signedTime.Add(5 * time.Minute).After(time.Now()) {
github.com/aws/aws-sdk-go/aws/credentials
credentials.go#L186: curTime = time.Now
github.com/aws/aws-sdk-go/aws/credentials/stscreds
assume_role_provider.go#L304: p.RoleSessionName = fmt.Sprintf("%d", time.Now().UTC().UnixNano())
web_identity_provider.go#L29: var now = time.Now
github.com/aws/aws-sdk-go/aws/csm
reporter.go#L54: now := time.Now()
reporter.go#L110: now := time.Now()
github.com/aws/aws-sdk-go/aws/ec2metadata
token_provider.go#L76: newToken.SetExpiration(time.Now().Add(output.TTL), ttlExpirationWindow)
github.com/aws/aws-sdk-go/aws/request
request.go#L144: Time: time.Now(),
request.go#L524: r.AttemptTime = time.Now()
github.com/aws/aws-sdk-go/aws/signer/v4
v4.go#L317: currentTimeFn = time.Now
v4.go#L428: SignSDKRequestWithCurrentTime(req, time.Now)
v4.go#L436: SignSDKRequestWithCurrentTime(req, time.Now, opts...)
github.com/aws/aws-sdk-go/internal/sdkrand
locked_source.go#L29: var SeededRand = rand.New(&lockedSource{src: rand.NewSource(time.Now().UnixNano())})
github.com/evanw/esbuild/internal/fs
modkey_unix.go#L23: now, err := unix.TimeToTimespec(time.Now())
github.com/evanw/esbuild/pkg/api
api_impl.go#L978: rand.Seed(time.Now().UnixNano())
serve_other.go#L115: start := time.Now()
github.com/go-git/go-billy/v5/util
util.go#L125: return uint32(time.Now().UnixNano() + int64(os.Getpid()))
github.com/go-git/go-git/v5
options.go#L432: When: time.Now(),
options.go#L440: When: time.Now(),
options.go#L448: When: time.Now(),
github.com/go-redis/redis/v8
cluster.go#L202: start := time.Now()
cluster.go#L217: atomic.StoreUint32(&n.failing, uint32(time.Now().Unix()))
cluster.go#L227: if time.Now().Unix()-int64(failing) < timeout {
cluster.go#L454: createdAt: time.Now(),
github.com/go-redis/redis/v8/internal/pool
conn.go#L32: createdAt: time.Now(),
conn.go#L37: cn.SetUsedAt(time.Now())
conn.go#L107: tm := time.Now()
pool.go#L515: now := time.Now()
github.com/golang-migrate/migrate/v4
migrate.go#L756: endTime := time.Now()
migration.go#L78: tnow := time.Now()
migration.go#L126: m.StartedBuffering = time.Now()
migration.go#L136: m.FinishedBuffering = time.Now()
migration.go#L145: m.FinishedReading = time.Now()
github.com/golang/protobuf/ptypes
timestamp.go#L50: ts, err := TimestampProto(time.Now())
github.com/google/go-cmp/cmp
report_text.go#L18: var randBool = rand.New(rand.NewSource(time.Now().Unix())).Intn(2) == 0
github.com/google/go-cmp/cmp/internal/diff
diff.go#L122: var randInt = rand.New(rand.NewSource(time.Now().Unix())).Intn(2)
github.com/jackc/pgconn
pgconn.go#L586: deadline := time.Now().Add(time.Second * 15)
github.com/jackc/pgx/v4
conn.go#L408: startTime := time.Now()
conn.go#L419: endTime := time.Now()
conn.go#L544: r.startTime = time.Now()
copy_from.go#L148: startTime := time.Now()
copy_from.go#L158: endTime := time.Now()
rows.go#L145: endTime := time.Now()
github.com/lib/pq
conn.go#L349: deadline := time.Now().Add(duration)
notify.go#L773: nextReconnect = time.Now().Add(reconnectInterval)
github.com/prometheus/client_golang/prometheus
gauge.go#L99: g.Set(float64(time.Now().UnixNano()) / 1e9)
go_collector.go#L310: c.msLastTimestamp = time.Now()
summary.go#L229: s.headStreamExpTime = time.Now().Add(s.streamDuration)
summary.go#L280: now := time.Now()
summary.go#L297: s.swapBufs(time.Now())
timer.go#L35: begin: time.Now(),
github.com/prometheus/client_golang/prometheus/promhttp
instrument_client.go#L92: start := time.Now()
instrument_client.go#L137: start := time.Now()
instrument_server.go#L66: now := time.Now()
instrument_server.go#L75: now := time.Now()
instrument_server.go#L133: now := time.Now()
github.com/prometheus/common/model
alert.go#L64: return a.ResolvedAt(time.Now())
time.go#L53: return TimeFromUnixNano(time.Now().UnixNano())
github.com/sergi/go-diff/diffmatchpatch
diff.go#L93: deadline = time.Now().Add(dmp.DiffTimeout)
diff.go#L288: if !deadline.IsZero() && d%16 == 0 && time.Now().After(deadline) {
go.opencensus.io/plugin/ocgrpc
client_stats_handler.go#L30: startTime := time.Now()
server_stats_handler.go#L31: startTime := time.Now()
go.opencensus.io/plugin/ochttp
client_stats.go#L45: start: time.Now(),
server.go#L155: start: time.Now(),
go.opencensus.io/stats/view
worker.go#L189: now: time.Now(),
worker.go#L208: t: time.Now(),
worker.go#L327: w.startTimes[vi] = time.Now()
worker.go#L351: End: time.Now(),
worker.go#L390: now := time.Now()
go.opencensus.io/trace
trace.go#L239: StartTime: time.Now(),
trace.go#L418: now := time.Now()
trace.go#L435: now := time.Now()
trace.go#L477: now := time.Now()
trace.go#L499: now := time.Now()
go.opencensus.io/zpages
rpcz.go#L36: programStartTime = time.Now()
golang.org/x/crypto/openpgp/packet
config.go#L74: return time.Now()
golang.org/x/crypto/ssh
certs.go#L400: clock = time.Now
tcpip.go#L48: var portRandomizer = rand.New(rand.NewSource(time.Now().UnixNano()))
golang.org/x/crypto/ssh/agent
keyring.go#L119: if k.expire != nil && time.Now().After(*k.expire) {
keyring.go#L174: t := time.Now().Add(time.Duration(key.LifetimeSecs) * time.Second)
golang.org/x/net/context
go17.go#L63: return WithDeadline(parent, time.Now().Add(timeout))
golang.org/x/net/http2
server.go#L2447: date = time.Now().UTC().Format(http.TimeFormat)
transport.go#L1230: cc.lastActive = time.Now()
transport.go#L1716: cc.lastActive = time.Now()
transport.go#L1720: cc.lastIdle = time.Now()
transport.go#L2725: ci.IdleTime = time.Now().Sub(cc.lastActive)
golang.org/x/net/internal/timeseries
timeseries.go#L83: func (defaultClock) Time() time.Time { return time.Now() }
golang.org/x/net/trace
events.go#L46: now := time.Now()
events.go#L136: el.Start = time.Now()
events.go#L314: e := logEntry{When: time.Now(), IsErr: isErr, What: fmt.Sprintf(format, a...)}
trace.go#L365: tr.Start = time.Now()
trace.go#L398: elapsed := time.Now().Sub(tr.Start)
trace.go#L797: e := event{When: time.Now(), What: x, Recyclable: recyclable, Sensitive: sensitive}
golang.org/x/oauth2
token.go#L122: var timeNow = time.Now
golang.org/x/oauth2/google
google.go#L200: Expiry: time.Now().Add(time.Duration(res.ExpiresInSec) * time.Second),
jwt.go#L55: iat := time.Now()
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/jws
jws.go#L58: now := time.Now().Add(-10 * time.Second)
golang.org/x/oauth2/jwt
jwt.go#L120: claimSet.Exp = time.Now().Add(t).Unix()
jwt.go#L168: token.Expiry = time.Now().Add(time.Duration(secs) * time.Second)
golang.org/x/pkgsite/cmd/prober
main.go#L281: Start: time.Now(),
main.go#L352: start := time.Now()
golang.org/x/pkgsite/internal/config
config.go#L362: FallbackVersionLabel: time.Now().Format(AppVersionFormat),
config.go#L559: src := rand.NewSource(time.Now().UnixNano())
golang.org/x/pkgsite/internal/database
copy.go#L52: start := time.Now()
copy.go#L64: start = time.Now()
database.go#L122: start := time.Now()
logging.go#L77: start := time.Now()
logging.go#L129: start := time.Now()
golang.org/x/pkgsite/internal/fetch
fetch.go#L120: start := time.Now()
fetch.go#L187: Start: time.Now(),
fetch.go#L402: now := time.Now()
fetch.go#L424: fi.Finish = time.Now()
fetchlocal.go#L73: Start: time.Now(),
golang.org/x/pkgsite/internal/frontend
fetch.go#L131: start := time.Now()
fetch.go#L187: start := time.Now()
golang.org/x/pkgsite/internal/middleware
caching.go#L143: start := time.Now()
requestlog.go#L60: start := time.Now()
stats.go#L56: start := time.Now()
stats.go#L83: start: time.Now(),
golang.org/x/pkgsite/internal/postgres
search.go#L197: searchStart := time.Now()
search.go#L208: start := time.Now()
test_helper.go#L164: start := time.Now()
golang.org/x/pkgsite/internal/proxy
server.go#L49: http.ServeContent(w, r, modulePath, time.Now(), defaultInfo(resolvedVersion))
server.go#L59: http.ServeContent(w, r, modulePath, time.Now(), defaultInfo(resolvedVersion))
server.go#L75: http.ServeContent(w, r, m.ModulePath, time.Now(), strings.NewReader(goMod))
server.go#L86: http.ServeContent(w, r, m.ModulePath, time.Now(), bytes.NewReader(m.zip))
server.go#L104: http.ServeContent(w, r, modulePath, time.Now(), strings.NewReader(strings.Join(vList, "\n")))
server.go#L145: http.ServeContent(w, r, m.ModulePath, time.Now(), strings.NewReader(""))
golang.org/x/pkgsite/internal/testing/sample
sample.go#L172: return time.Now().In(time.UTC).Truncate(time.Microsecond)
golang.org/x/pkgsite/internal/worker
fetch.go#L137: start := time.Now()
fetch.go#L205: start := time.Now()
fetch.go#L250: start := time.Now()
fetch.go#L324: start := time.Now()
fetch.go#L365: start := time.Now()
pages.go#L34: var startTime = time.Now()
google.golang.org/api/idtoken
cache.go#L72: return time.Now()
compute.go#L54: Expiry: time.Now().Add(55 * time.Minute),
validate.go#L34: now = time.Now
google.golang.org/grpc
clientconn.go#L783: atomic.StoreInt64(&cc.czData.lastCallStartedTime, time.Now().UnixNano())
clientconn.go#L1121: connectDeadline := time.Now().Add(dialDuration)
clientconn.go#L1474: atomic.StoreInt64(&ac.czData.lastCallStartedTime, time.Now().UnixNano())
server.go#L775: rawConn.SetDeadline(time.Now().Add(s.opts.connectionTimeout))
server.go#L971: atomic.StoreInt64(&s.czData.lastCallStartedTime, time.Now().UnixNano())
server.go#L1000: s.opts.statsHandler.HandleRPC(stream.Context(), outPayload(false, msg, data, payload, time.Now()))
server.go#L1047: beginTime := time.Now()
server.go#L1078: EndTime: time.Now(),
server.go#L1176: RecvTime: time.Now(),
server.go#L1327: beginTime := time.Now()
server.go#L1363: EndTime: time.Now(),
stream.go#L252: beginTime = time.Now()
stream.go#L878: a.statsHandler.HandleRPC(cs.ctx, outPayload(true, m, data, payld, time.Now()))
stream.go#L928: RecvTime: time.Now(),
stream.go#L989: EndTime: time.Now(),
stream.go#L1459: ss.statsHandler.HandleRPC(ss.s.Context(), outPayload(false, m, data, payload, time.Now()))
stream.go#L1510: RecvTime: time.Now(),
google.golang.org/grpc/balancer/grpclb
grpclb_remote_balancer.go#L306: t := time.Now()
google.golang.org/grpc/internal/binarylog
method_logger.go#L75: timestamp, _ := ptypes.TimestampProto(time.Now())
google.golang.org/grpc/internal/channelz
funcs.go#L204: trace: &channelTrace{createdTime: time.Now(), events: make([]*TraceEvent, 0, getMaxTraceEntry())},
funcs.go#L229: trace: &channelTrace{createdTime: time.Now(), events: make([]*TraceEvent, 0, getMaxTraceEntry())},
funcs.go#L456: childTC.getChannelTrace().append(&TraceEvent{Desc: desc.Desc, Severity: desc.Severity, Timestamp: time.Now()})
funcs.go#L470: Timestamp: time.Now(),
types.go#L652: e.Timestamp = time.Now()
google.golang.org/grpc/internal/grpcrand
grpcrand.go#L30: r = rand.New(rand.NewSource(time.Now().UnixNano()))
google.golang.org/grpc/internal/transport
bdp_estimator.go#L78: b.sentAt = time.Now()
http2_client.go#L623: atomic.StoreInt64(&t.czData.lastStreamCreatedTime, time.Now().UnixNano())
http2_client.go#L1025: if d, ok := s.ctx.Deadline(); ok && !d.After(time.Now()) {
http2_client.go#L1281: atomic.StoreInt64(&t.lastRead, time.Now().UnixNano())
http2_client.go#L1296: atomic.StoreInt64(&t.lastRead, time.Now().UnixNano())
http2_client.go#L1359: prevNano := time.Now().UnixNano()
http2_client.go#L1369: timer.Reset(time.Duration(lastRead) + t.kp.Time - time.Duration(time.Now().UnixNano()))
http2_client.go#L1464: atomic.StoreInt64(&t.czData.lastMsgSentTime, time.Now().UnixNano())
http2_client.go#L1469: atomic.StoreInt64(&t.czData.lastMsgRecvTime, time.Now().UnixNano())
http2_server.go#L230: idle: time.Now(),
http2_server.go#L281: atomic.StoreInt64(&t.lastRead, time.Now().UnixNano())
http2_server.go#L412: atomic.StoreInt64(&t.czData.lastStreamCreatedTime, time.Now().UnixNano())
http2_server.go#L460: atomic.StoreInt64(&t.lastRead, time.Now().UnixNano())
http2_server.go#L709: now := time.Now()
http2_server.go#L964: prevNano := time.Now().UnixNano()
http2_server.go#L1017: kpTimer.Reset(time.Duration(lastRead) + t.kp.Time - time.Duration(time.Now().UnixNano()))
http2_server.go#L1090: t.idle = time.Now()
http2_server.go#L1237: atomic.StoreInt64(&t.czData.lastMsgSentTime, time.Now().UnixNano())
http2_server.go#L1242: atomic.StoreInt64(&t.czData.lastMsgRecvTime, time.Now().UnixNano())
google.golang.org/protobuf/types/known/timestamppb
timestamp.pb.go#L188: return New(time.Now())
io/ioutil
tempfile.go#L25: return uint32(time.Now().UnixNano() + int64(os.Getpid()))
log
log.go#L162: now := time.Now() // get this early.
net
dial.go#L373: deadline := d.deadline(ctx, time.Now())
dial.go#L533: partialDeadline, err := partialDeadline(time.Now(), deadline, len(ras)-i)
dnsclient_unix.go#L152: ctx, cancel := context.WithDeadline(ctx, time.Now().Add(timeout))
dnsclient_unix.go#L338: conf.lastChecked = time.Now()
dnsclient_unix.go#L357: now := time.Now()
hosts.go#L53: now := time.Now()
interface.go#L196: now := time.Now()
net/http
client.go#L189: return time.Now().Add(c.Timeout)
client.go#L359: return cancelCtx, func() bool { return time.Now().After(deadline) }
h2_bundle.go#L6002: date = time.Now().UTC().Format(TimeFormat)
h2_bundle.go#L7733: cc.lastActive = time.Now()
h2_bundle.go#L8219: cc.lastActive = time.Now()
h2_bundle.go#L8223: cc.lastIdle = time.Now()
h2_bundle.go#L9229: ci.IdleTime = time.Now().Sub(cc.lastActive)
server.go#L966: t0 := time.Now()
server.go#L976: c.rwc.SetWriteDeadline(time.Now().Add(d))
server.go#L1418: setHeader.date = appendTime(cw.res.dateBuf[:0], time.Now())
server.go#L1764: packedState := uint64(time.Now().Unix()<<8) | uint64(state)
server.go#L1835: c.rwc.SetReadDeadline(time.Now().Add(d))
server.go#L1838: c.rwc.SetWriteDeadline(time.Now().Add(d))
server.go#L1976: c.rwc.SetReadDeadline(time.Now().Add(d))
server.go#L2796: if st == StateNew && unixSec < time.Now().Unix()-5 {
transport.go#L993: pconn.idleAt = time.Now()
transport.go#L1022: oldTime = time.Now().Add(-t.IdleConnTimeout)
transport.go#L2669: logf(time.Now().Format(time.RFC3339Nano)+": "+format, args...)
runtime/pprof
proto.go#L261: start: time.Now(),
proto.go#L338: b.end = time.Now()
testing
benchmark.go#L126: b.start = time.Now()
benchmark.go#L161: b.start = time.Now()
run_example.go#L47: start := time.Now()
testing.go#L1066: t.start = time.Now()
testing.go#L1161: cleanupStart := time.Now()
testing.go#L1191: t.start = time.Now()
testing.go#L1479: deadline = time.Now().Add(*timeout)
testing.go#L1696: deadline := time.Now().Add(*timeout)
 |
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. |