From fae2846a85aad314ee44957d428478fbe800045f Mon Sep 17 00:00:00 2001 From: crusader Date: Mon, 3 Sep 2018 22:57:13 +0900 Subject: [PATCH] ing --- benchmark/elapsed.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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) } }