github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/pkg/depends/x/misc/timer/timer_test.go (about) 1 package timer_test 2 3 import ( 4 "testing" 5 "time" 6 7 "github.com/machinefi/w3bstream/pkg/depends/x/misc/timer" 8 ) 9 10 func TestStartSpan(t *testing.T) { 11 span := timer.StartSpan() 12 13 t.Log(span.StartedAt()) 14 time.Sleep(time.Second) 15 t.Log(span.Cost()) 16 time.Sleep(time.Second) 17 t.Log(span.Cost()) 18 }