Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶
type Engine interface { // 当前时间戳 Now() int64 // 启动定时器 Start(timer Timer) bool // 关闭定时器 Stop(timer Timer) bool // 关闭Engine Close() error }
Engine 毫秒级定时器管理
type ID ¶
type ID = uint64
ID 定时器唯一ID
func NewDelayer ¶
NewDelayer 创建timer,delay为延迟时间
type RunOption ¶
type RunOption func(o *RunOptions)
type RunOptions ¶
type RunOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.