From 4585bf96b4025f18682122bbd66d4f2a010b3ac9 Mon Sep 17 00:00:00 2001 From: hopehook Date: Fri, 30 Sep 2022 10:29:30 +0800 Subject: 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 Reviewed-by: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov Run-TryBot: hopehook Run-TryBot: Ian Lance Taylor Auto-Submit: Ian Lance Taylor --- src/runtime/runtime_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/runtime_test.go') diff --git a/src/runtime/runtime_test.go b/src/runtime/runtime_test.go index 018a8dbaa6..2faf06e2b9 100644 --- a/src/runtime/runtime_test.go +++ b/src/runtime/runtime_test.go @@ -377,7 +377,7 @@ func BenchmarkGoroutineProfile(b *testing.B) { if !ok { b.Fatal("goroutine profile failed") } - latencies = append(latencies, time.Now().Sub(start)) + latencies = append(latencies, time.Since(start)) } b.StopTimer() -- cgit v1.3-6-g1900