mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2024-11-23 05:06:01 +03:00
13 lines
188 B
Go
13 lines
188 B
Go
|
package profile
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
"log"
|
||
|
)
|
||
|
|
||
|
func Duration(invocation time.Time, name string) {
|
||
|
elapsed := time.Since(invocation)
|
||
|
|
||
|
log.Printf("%s lasted %s", name, elapsed)
|
||
|
}
|