From 261a8d9abdc569a864a2cde37f9b5697501a212d Mon Sep 17 00:00:00 2001 From: Daniel Martí Date: Wed, 6 Sep 2017 21:13:06 +0200 Subject: testing: use time.Since instead of time.Now().Sub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia0479f65a6ef033a65acf9ac8692777839a53b8c Reviewed-on: https://go-review.googlesource.com/61990 Run-TryBot: Daniel Martí Reviewed-by: Ian Lance Taylor TryBot-Result: Gobot Gobot --- src/testing/example.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/testing/example.go') diff --git a/src/testing/example.go b/src/testing/example.go index e5bce7af4e..b9955500e6 100644 --- a/src/testing/example.go +++ b/src/testing/example.go @@ -87,7 +87,7 @@ func runExample(eg InternalExample) (ok bool) { // Clean up in a deferred call so we can recover if the example panics. defer func() { - dstr := fmtDuration(time.Now().Sub(start)) + dstr := fmtDuration(time.Since(start)) // Close pipe, restore stdout, get output. w.Close() -- cgit v1.3