package
Version:
v0.0.4
Opens a new window with list of versions in this module.
Published: Jul 20, 2021
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type TimerWheel struct {
}
TimerWheel 时钟轮
NewTimerWheel create a instance of TimerWheel with given options
After add a timer using the given interval time
AfterFunc add a timer callback function which will trigger after the given interval time and trigger times
Start a ticker for check expired items
type TwOption struct {
TickDuration time.Duration `json:"tick_duration" yaml:"tick_duration"`
WheelCount int `json:"wheel_count" yaml:"wheel_count"`
}
TwOption is the configuration of TimerWheel
Source Files
¶
Click to show internal directories.
Click to hide internal directories.