schedule

package
v0.0.0-...-0286adb Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimeWheel

type TimeWheel struct {
	TicksPerWheel int           // 一轮的tick数
	TickDuration  int           // 一个tick的持续时间
	TimeUnit      time.Duration // 时间单位

	Pointer *slot // 当前指针
	// contains filtered or unexported fields
}

func New

func New(ticksPerWheel, tickDuration int, timeUnit time.Duration) (*TimeWheel, error)

//////////////////// 初始化时间盘

func (*TimeWheel) Start

func (tw *TimeWheel) Start()

时间盘开始转动

type TimeWheelFunc

type TimeWheelFunc func(p ...interface{})

方法接口,所有的实现类必须实现该接口

Jump to

Keyboard shortcuts

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