if debugging then print lag to stderr
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user