forked from cerc-io/plugeth
13 lines
156 B
Go
13 lines
156 B
Go
package common
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
func Bench(pre string, cb func()) {
|
|
start := time.Now()
|
|
cb()
|
|
fmt.Println(pre, ": took:", time.Since(start))
|
|
}
|