diff options
| author | Daniel Martí <mvdan@mvdan.cc> | 2017-09-06 21:13:06 +0200 |
|---|---|---|
| committer | Daniel Martí <mvdan@mvdan.cc> | 2017-09-06 19:47:37 +0000 |
| commit | 261a8d9abdc569a864a2cde37f9b5697501a212d (patch) | |
| tree | 7d88284d504c06514e3de1ac95458ee9d20dd08e /src/testing/testing.go | |
| parent | 6367c19f26b9b84cee73264522d6ebfc05801053 (diff) | |
| download | go-261a8d9abdc569a864a2cde37f9b5697501a212d.tar.xz | |
testing: use time.Since instead of time.Now().Sub
Change-Id: Ia0479f65a6ef033a65acf9ac8692777839a53b8c
Reviewed-on: https://go-review.googlesource.com/61990
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/testing/testing.go')
| -rw-r--r-- | src/testing/testing.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go index 8b4bfc31a8..a170cd0fd9 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -701,7 +701,7 @@ func tRunner(t *T, fn func(t *T)) { t.Errorf("race detected during execution of test") } - t.duration += time.Now().Sub(t.start) + t.duration += time.Since(t.start) // If the test panicked, print any test output before dying. err := recover() if !t.finished && err == nil { |
