Discard old history entries.

This commit is contained in:
Juliusz Chroboczek
2020-10-08 14:38:33 +02:00
parent 865848c7bc
commit 90ba4814c8
4 changed files with 47 additions and 22 deletions
-22
View File
@@ -1,22 +0,0 @@
package rtpconn
import (
"testing"
"time"
)
func TestJSTime(t *testing.T) {
tm := time.Now()
js := toJSTime(tm)
tm2 := fromJSTime(js)
js2 := toJSTime(tm2)
if js != js2 {
t.Errorf("%v != %v", js, js2)
}
delta := tm.Sub(tm2)
if delta < -time.Millisecond/2 || delta > time.Millisecond/2 {
t.Errorf("Delta %v, %v, %v", delta, tm, tm2)
}
}