aboutsummaryrefslogtreecommitdiffstats
path: root/common/common.go
blob: 53709bb722686e1378f8327a2fedb4629ca5664d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
package common

import (
    "fmt"
    "time"
)

func Bench(pre string, cb func()) {
    start := time.Now()
    cb()
    fmt.Println(pre, ": took:", time.Since(start))
}