diff --git a/test/durationTimerTest.go b/test/durationTimerTest.go new file mode 100644 index 000000000..43b5ce863 --- /dev/null +++ b/test/durationTimerTest.go @@ -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 +}