Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Add a test utility for timing the duration of things easily

Gabe Kangasbdd5a2f048c9
diff --git a/test/durationTimerTest.go b/test/durationTimerTest.go
new file mode 100644
index 0000000000..43b5ce8636
--- /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
+}