import "github.com/x-mod/heaptimer"
timer := heaptimer.New(time.Microsecond * 100)
go timer.Serve(context.TODO())
defer timer.Close()
timer.Push(v1, time.Now())
timer.Push(v2, time.Now().Add(time.Second * 2))
timer.PushWithDuration(v3, time.Second * 3)
v, ok := timer.Pop()
//OR
v, ok := <-timer.V
-
Notifications
You must be signed in to change notification settings - Fork 0
x-mod/heaptimer
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Packages 0
No packages published