timer

package
v0.0.0-...-1aa53b4 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Execute

type Execute func(key string)

type ITimer

type ITimer interface {
	StartTimer(key string, delay time.Duration, isLoop bool)
	StopTimer(key string)
	StopTimeWheel()
}

type Task

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

type TimeWheel

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

func NewTimeTheel

func NewTimeTheel(interval time.Duration, numSlots int, execute Execute) (*TimeWheel, error)

func (*TimeWheel) StartTimer

func (tw *TimeWheel) StartTimer(key string, delay time.Duration, isLoop bool)

func (*TimeWheel) StopTimeWheel

func (tw *TimeWheel) StopTimeWheel()

func (*TimeWheel) StopTimer

func (tw *TimeWheel) StopTimer(key string)

Jump to

Keyboard shortcuts

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