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)
This commit is contained in:
Karsten Weiss
2018-04-15 15:24:24 +02:00
parent 95bbf69653
commit 749a0db289

View File

@ -420,7 +420,7 @@ func main() {
} }
var stopTimer = func(count int32) { var stopTimer = func(count int32) {
runtime.ReadMemStats(&memStats) 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} Bytes: 0, MemAllocs: memStats.Mallocs - startAllocs, MemBytes: memStats.TotalAlloc - startBytes}
} }
sharedPos := make([]bool, len(featuresPos)) sharedPos := make([]bool, len(featuresPos))