gobstore/timer.go

15 lines
205 B
Go
Raw Normal View History

2025-01-12 09:51:51 +00:00
package gobstore
import (
"fmt"
"time"
)
// timer is a helper function
func timer(name string) func() {
start := time.Now()
return func() {
fmt.Printf("%s took %v\n", name, time.Since(start))
}
}