Documentation ¶
Index ¶
- Variables
- func After(d time.Duration) <-chan struct{}
- func AfterFunc(d time.Duration, f func())
- func ResetMask(mask int, stop ...bool)
- func ResetPrecision(precision time.Duration, stop ...bool)
- func ResetPrecisionAndMask(precision time.Duration, mask int, stop ...bool)
- type TaskList
- type TaskNode
- type TimeWheel
- type Timer
- type XTimerHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultPrecision ... DefaultPrecision = time.Millisecond * 100 // DefaultBaseMask ... DefaultBaseMask = 10 )
View Source
var ( // ElementCntPerBucket ... ElementCntPerBucket = []int64{256, 64, 64, 64, 64} )
Functions ¶
Types ¶
type TimeWheel ¶
type TimeWheel struct {
// contains filtered or unexported fields
}
TimeWheel ...
func NewTimeWheel ¶
NewTimeWheel : basetime is min precision.intervals the number of each bucket.
type XTimerHandler ¶
type XTimerHandler struct {
// contains filtered or unexported fields
}
XTimerHandler ...
func NewXTimerHandler ¶
func NewXTimerHandler(precision time.Duration, buckets int) *XTimerHandler
NewXTimerHandler ...
func (*XTimerHandler) After ¶
func (p *XTimerHandler) After(d time.Duration) <-chan struct{}
After ...
func (*XTimerHandler) AfterFunc ¶
func (p *XTimerHandler) AfterFunc(d time.Duration, task func())
AfterFunc ...
Click to show internal directories.
Click to hide internal directories.