time.Duration.Seconds (method)
38 uses
time (current package)
time.go#L747: func (d Duration) Seconds() float64 {
cloud.google.com/go/storage
storage.go#L578: "X-Goog-Expires": {fmt.Sprintf("%d", int(opts.Expires.Sub(now).Seconds()))},
github.com/go-redis/redis_rate/v9
rate.go#L97: values := []interface{}{limit.Burst, limit.Rate, limit.Period.Seconds(), n}
rate.go#L133: values := []interface{}{limit.Burst, limit.Rate, limit.Period.Seconds(), n}
github.com/prometheus/client_golang/prometheus
go_collector.go#L325: quantiles[float64(idx+1)/float64(len(stats.PauseQuantiles)-1)] = pq.Seconds()
go_collector.go#L327: quantiles[0.0] = stats.PauseQuantiles[0].Seconds()
go_collector.go#L328: ch <- MustNewConstSummary(c.gcDesc, uint64(stats.NumGC), stats.PauseTotal.Seconds(), quantiles)
timer.go#L51: t.observer.Observe(d.Seconds())
github.com/prometheus/client_golang/prometheus/promhttp
instrument_client.go#L95: obs.With(labels(code, method, r.Method, resp.StatusCode)).Observe(time.Since(start).Seconds())
instrument_client.go#L142: it.GotConn(time.Since(start).Seconds())
instrument_client.go#L150: it.PutIdleConn(time.Since(start).Seconds())
instrument_client.go#L155: it.DNSStart(time.Since(start).Seconds())
instrument_client.go#L160: it.DNSDone(time.Since(start).Seconds())
instrument_client.go#L165: it.ConnectStart(time.Since(start).Seconds())
instrument_client.go#L173: it.ConnectDone(time.Since(start).Seconds())
instrument_client.go#L178: it.GotFirstResponseByte(time.Since(start).Seconds())
instrument_client.go#L183: it.Got100Continue(time.Since(start).Seconds())
instrument_client.go#L188: it.TLSHandshakeStart(time.Since(start).Seconds())
instrument_client.go#L196: it.TLSHandshakeDone(time.Since(start).Seconds())
instrument_client.go#L201: it.WroteHeaders(time.Since(start).Seconds())
instrument_client.go#L206: it.Wait100Continue(time.Since(start).Seconds())
instrument_client.go#L211: it.WroteRequest(time.Since(start).Seconds())
instrument_server.go#L70: obs.With(labels(code, method, r.Method, d.Status())).Observe(time.Since(now).Seconds())
instrument_server.go#L77: obs.With(labels(code, method, r.Method, 0)).Observe(time.Since(now).Seconds())
instrument_server.go#L135: obs.With(labels(code, method, r.Method, status)).Observe(time.Since(now).Seconds())
golang.org/x/net/internal/timeseries
timeseries.go#L437: fraction := overlapEnd.Sub(overlapStart).Seconds() / base.Seconds()
golang.org/x/net/trace
events.go#L360: return fmt.Sprintf("%.6f", elapsed.Seconds())
trace.go#L664: func (m minCond) String() string { return fmt.Sprintf("≥%gs", time.Duration(m).Seconds()) }
trace.go#L900: return fmt.Sprintf("%.6f", t.Seconds())
trace.go#L935: b := []byte(fmt.Sprintf("%.6f", d.Seconds()))
golang.org/x/pkgsite/internal/database
logging.go#L88: DurationSeconds: dur.Seconds(),
golang.org/x/pkgsite/internal/fetch
fetch.go#L122: latency := float64(time.Since(start).Seconds())
golang.org/x/pkgsite/internal/frontend
fetch.go#L214: logf(ctx, "fetched %s@%s for %s: status=%d, err=%v; took %.3fs", modulePath, requestedVersion, fullPath, fr.status, fr.err, time.Since(start).Seconds())
golang.org/x/pkgsite/internal/worker
fetch.go#L398: times = append(times, fmt.Sprintf("%s=%.3fs", k, v.Seconds()))
google.golang.org/grpc/internal/transport
bdp_estimator.go#L111: rttSample := time.Since(b.sentAt).Seconds()
testing
benchmark.go#L381: return (float64(r.Bytes) * float64(r.N) / 1e6) / r.T.Seconds()
testing.go#L625: return fmt.Sprintf("%.2fs", d.Seconds())
 |
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. |