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为延迟时间
Click to show internal directories.
Click to hide internal directories.