rtimer

package
v1.4.46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func After

func After(t time.Duration) <-chan struct{}

After like time.After

func SetAccuracy

func SetAccuracy(a int)

SetAccuracy sets the accuracy for the timewheel. low accuracy usually have better performance.

Types

type TimeWheel

type TimeWheel struct {
	// contains filtered or unexported fields
}

TimeWheel struct.

func NewTimeWheel

func NewTimeWheel(t time.Duration, size int) *TimeWheel

NewTimeWheel new timewheel with size.

func (*TimeWheel) After

func (tw *TimeWheel) After(timeout time.Duration) <-chan struct{}

After like time.After

func (*TimeWheel) Stop

func (tw *TimeWheel) Stop()

Stop stops the timewheel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL