mirror of
https://github.com/luxfi/timer.git
synced 2026-10-30 15:15:40 +00:00
- Remove meter.go (duplicate Meter interface) - Keep concrete Meter struct in clock.go - Add new timer files (adaptive, staged, stopped)
22 lines
342 B
Go
22 lines
342 B
Go
// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package timer
|
|
|
|
import (
|
|
"sync"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestTimer(*testing.T) {
|
|
wg := sync.WaitGroup{}
|
|
wg.Add(1)
|
|
defer wg.Wait()
|
|
|
|
timer := NewTimer(wg.Done)
|
|
go timer.Dispatch()
|
|
|
|
timer.SetTimeoutIn(time.Millisecond)
|
|
}
|