timingwheel

package
v0.0.0-...-f0734c7 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT 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 return a channel like time.After

func SetAccuracy

func SetAccuracy(a int)

Types

type TimingWheel

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

func NewTimingWheel

func NewTimingWheel(t time.Duration, size int) *TimingWheel

NewTimingWheel -

func (*TimingWheel) After

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

After like time.After

func (*TimingWheel) Stop

func (tw *TimingWheel) Stop()

Stop stop timingWheel's time.ticker

Jump to

Keyboard shortcuts

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