go-ethereum/common/common.go

13 lines
156 B
Go
Raw Normal View History

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