package globals

import (
	"testing"
	"time"
)

func TestJson(t *testing.T) {
	//var tmp VboxBroadcastSt
	//var vol VboxVolSt = VboxVolSt{VolumeScale: 0, VolumePer: 50, Mute: true}
	//tmp.VboxVolStPtr = &vol
	//
	//if tmpStr, err := json.Marshal(tmp); nil == err {
	//	t.Log("info:%+v\n", string(tmpStr))
	//} else {
	//	t.Log("nil")
	//}

}

func TestTimer(t *testing.T) {
	timer := time.NewTimer(5 * time.Second)

	go func() {
		timer.Reset(0)
	}()
	select {
	case tinfo := <-timer.C:
		t.Log("tinfo:", tinfo)
	}
}
