ing
This commit is contained in:
parent
e1bcbd13cd
commit
fae2846a85
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user