elapsed added

This commit is contained in:
crusader 2018-09-01 12:12:54 +09:00
parent 2339fcd264
commit e1bcbd13cd

13
benchmark/elapsed.go Normal file
View File

@ -0,0 +1,13 @@
package benchmark
import (
"fmt"
"time"
)
func Elapsed(what string) func() {
start := time.Now()
return func() {
fmt.Printf("%s: %v", what, time.Since(start))
}
}