plugeth/common/common.go

13 lines
156 B
Go
Raw Normal View History

2015-03-16 10:27:38 +00:00
package common
2014-02-25 10:20:24 +00:00
import (
"fmt"
"time"
2014-02-25 10:20:24 +00:00
)
func Bench(pre string, cb func()) {
start := time.Now()
cb()
fmt.Println(pre, ": took:", time.Since(start))
}