timewheel

package
v0.0.0-...-262ee3b Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Location

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

type Task

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

type TimeWheel

type TimeWheel struct {
	// contains filtered or unexported fields
}
var Tw *TimeWheel

func InitTimeWheel

func InitTimeWheel(interval time.Duration, slotnum int) *TimeWheel

func (*TimeWheel) AddTask

func (Tw *TimeWheel) AddTask(key string, delay time.Duration, job func())

func (*TimeWheel) RemoveTask

func (Tw *TimeWheel) RemoveTask(key string)

func (*TimeWheel) Start

func (Tw *TimeWheel) Start()

func (*TimeWheel) Stop

func (Tw *TimeWheel) Stop()

Jump to

Keyboard shortcuts

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