//
pkg.gl
Category
github.com/zerogo-hub/zero-helper
timer
package
0.49.11
Repository:
https://github.com/zerogo-hub/zero-helper.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
8
Dependents
2
Files
417 SLOC
#
Packages
example
No description provided by the author
#
Functions
New
New 创建一个时间轮.
NewPool
NewPool 创建一个时间轮池 poolsize: 时间轮个数 slotNum: 每个时间论多少个槽 interval: 时间轮检测间隔.
#
Structs
Task
Task 表示一个将要执行的任务,存储于 Slot 中.
TimerWheel
TimerWheel 时间轮.
TimerWheelPool
TimerWheelPool 时间轮池 推荐使用,而不是直接使用 TimerWheel 可以将任务分发在多个时间轮中.
#
Type aliases
Handler
Handler 任务执行回调函数.