if debugging then print lag to stderr

This commit is contained in:
bel
2023-03-25 00:11:12 -06:00
parent 6bbb297c59
commit 607a65e22e
2 changed files with 11 additions and 1 deletions

View File

@@ -1,12 +1,14 @@
package button_test
import (
"fmt"
"mayhem-party/src/device/input/button"
"testing"
"time"
)
func TestV01(t *testing.T) {
src := constSrc(`{"T":1,"U":"bel","Y":"abc","N":"cde"}`)
src := constSrc(fmt.Sprintf(`{"T":%v,"U":"bel","Y":"abc","N":"cde"}`, time.Now().UnixNano()/int64(time.Millisecond)-50))
t.Logf("(%v) %s", len(src), src.Read())
v01 := button.NewV01(src)
got := v01.Read()