From daf1612dc7700477b97825308d03cd8e23520769 Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Thu, 29 Sep 2022 21:45:51 +0800 Subject: [PATCH] internal: use time.Since instead of time.Now().Sub Change-Id: I536c7fad84a63e96658c6930a5a77fd70edca33c Reviewed-on: https://go-review.googlesource.com/c/go/+/436718 Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot Reviewed-by: Dmitri Shuralyov Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor --- src/internal/fuzz/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/fuzz/worker.go b/src/internal/fuzz/worker.go index fca3aea578d..467c39bdc93 100644 --- a/src/internal/fuzz/worker.go +++ b/src/internal/fuzz/worker.go @@ -792,7 +792,7 @@ func (ws *workerServer) fuzz(ctx context.Context, args fuzzArgs) (resp fuzzRespo func (ws *workerServer) minimize(ctx context.Context, args minimizeArgs) (resp minimizeResponse) { start := time.Now() - defer func() { resp.Duration = time.Now().Sub(start) }() + defer func() { resp.Duration = time.Since(start) }() mem := <-ws.memMu defer func() { ws.memMu <- mem }() vals, err := unmarshalCorpusFile(mem.valueCopy())