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