mirror of
https://github.com/owncast/owncast.git
synced 2024-11-28 19:19:06 +03:00
20 lines
248 B
Go
20 lines
248 B
Go
|
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
|
||
|
}
|