mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
all: use time.Since instead of time.Now().Sub
Change-Id: Ifaa73b64e5b6a1d37c753e2440b642478d7dfbce Reviewed-on: https://go-review.googlesource.com/c/go/+/436957 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: hopehook <hopehook@golangcn.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
51297dd6df
commit
4585bf96b4
8 changed files with 9 additions and 9 deletions
|
|
@ -375,7 +375,7 @@ func BenchmarkReadMetricsLatency(b *testing.B) {
|
|||
for i := 0; i < b.N; i++ {
|
||||
start := time.Now()
|
||||
metrics.Read(samples)
|
||||
latencies = append(latencies, time.Now().Sub(start))
|
||||
latencies = append(latencies, time.Since(start))
|
||||
}
|
||||
// Make sure to stop the timer before we wait! The load created above
|
||||
// is very heavy-weight and not easy to stop, so we could end up
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue