1 changed files with 19 additions and 0 deletions
@ -0,0 +1,19 @@
@@ -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 |
||||
} |
Loading…
Reference in new issue