timer

package
v0.0.0-...-730ab85 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeNearShift  = 8
	TimeNear       = 1 << TimeNearShift
	TimeLevelShift = 6
	TimeLevel      = 1 << TimeLevelShift
	TimeNearMask   = TimeNear - 1
	TimeLevelMask  = TimeLevel - 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecuteHandler

type ExecuteHandler func(param map[string]interface{}) error

type TimingWheel

type TimingWheel struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewTimingWheel

func NewTimingWheel(d time.Duration) *TimingWheel

func (*TimingWheel) NewWheel

func (tw *TimingWheel) NewWheel(p map[string]interface{}, d time.Duration, f ExecuteHandler) *Wheel

func (*TimingWheel) Start

func (tw *TimingWheel) Start()

func (*TimingWheel) Stop

func (tw *TimingWheel) Stop()

type Wheel

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

Jump to

Keyboard shortcuts

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