From 749a0db28945d2c6a1a3706393880fce6a9324eb Mon Sep 17 00:00:00 2001 From: Karsten Weiss Date: Sun, 15 Apr 2018 15:24:24 +0200 Subject: [PATCH] Use time.Since() helper function (gosimple) (I've dropped similar gosimple cleanups using time.Until() as this API is not available in go1.6 and go1.7) --- benchmark/benchmain/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/benchmain/main.go b/benchmark/benchmain/main.go index d9c63aea..a62bb930 100644 --- a/benchmark/benchmain/main.go +++ b/benchmark/benchmain/main.go @@ -420,7 +420,7 @@ func main() { } var stopTimer = func(count int32) { runtime.ReadMemStats(&memStats) - results = testing.BenchmarkResult{N: int(count), T: time.Now().Sub(startTime), + results = testing.BenchmarkResult{N: int(count), T: time.Since(startTime), Bytes: 0, MemAllocs: memStats.Mallocs - startAllocs, MemBytes: memStats.TotalAlloc - startBytes} } sharedPos := make([]bool, len(featuresPos))