diff --git a/benchmark/elapsed.go b/benchmark/elapsed.go index 15d955a..396addd 100644 --- a/benchmark/elapsed.go +++ b/benchmark/elapsed.go @@ -1,13 +1,12 @@ package benchmark import ( - "fmt" "time" ) -func Elapsed(what string) func() { +func Elapsed() func() time.Duration { start := time.Now() - return func() { - fmt.Printf("%s: %v", what, time.Since(start)) + return func() time.Duration { + return time.Since(start) } }