gecko/utils/timer/timer_test.go

22 lines
328 B
Go

// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package timer
import (
"sync"
"testing"
"time"
)
func TestTimer(t *testing.T) {
wg := sync.WaitGroup{}
wg.Add(1)
defer wg.Wait()
timer := NewTimer(wg.Done)
go timer.Dispatch()
timer.SetTimeoutIn(time.Millisecond)
}