mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2024-11-26 14:56:02 +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)
|
|
}
|