Skip to content

Commit

Permalink
internal: use time.Since instead of time.Now().Sub
Browse files Browse the repository at this point in the history
Change-Id: I536c7fad84a63e96658c6930a5a77fd70edca33c
Reviewed-on: https://go-review.googlesource.com/c/go/+/436718
Reviewed-by: Ian Lance Taylor <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
  • Loading branch information
cuiweixie authored and gopherbot committed Sep 29, 2022
1 parent b8ed88d commit daf1612
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/internal/fuzz/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit daf1612

Please sign in to comment.