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:
@ -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))
|
||||||
|
Reference in New Issue
Block a user