diff options
| author | hopehook <hopehook.com@gmail.com> | 2022-09-30 10:29:30 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-10-02 02:28:27 +0000 |
| commit | 4585bf96b4025f18682122bbd66d4f2a010b3ac9 (patch) | |
| tree | 9dd8b78001e9ead43e8602f998d1031a2d4a649c /src/runtime/runtime_test.go | |
| parent | 51297dd6df713b988b5c587e448b27d18ca1bd8a (diff) | |
| download | go-4585bf96b4025f18682122bbd66d4f2a010b3ac9.tar.xz | |
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>
Diffstat (limited to 'src/runtime/runtime_test.go')
| -rw-r--r-- | src/runtime/runtime_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
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() |
