0
This commit is contained in:
Ginger Wong 2020-09-22 17:10:06 -07:00
commit 336a35e981

19
test/durationTimerTest.go Normal file
View File

@ -0,0 +1,19 @@
package test
import (
"time"
log "github.com/sirupsen/logrus"
)
var timestamp time.Time
func Mark() {
now := time.Now()
if !timestamp.IsZero() {
delta := now.Sub(timestamp)
log.Println(delta.Milliseconds(), "ms")
}
timestamp = now
}