package
0.0.0-20220918065352-f53a7f730ba1
Repository: https://github.com/llr104/liframe.git
Documentation: pkg.go.dev
# Functions
时间轮定时器 自动调度.
创建一个延迟调用函数
*/.
创建一个定时器,在当前时间延迟duration之后触发 定时器方法
*/.
创建一个定时器,在指定的时间触发 定时器方法
df: DelayFunc类型的延迟调用函数类型
unixNano: unix计算机从1970-1-1至今经历的纳秒数
*/.
No description provided by the author
返回一个定时器调度器
主要创建分层定时器,并做关联,并依次启动
*/.
创建一个时间轮
name:时间轮的名称
interval:每个刻度之间的duration时间间隔
scales:当前时间轮的轮盘一共多少个刻度(如我们正常的时钟就是12个刻度)
maxCap: 每个刻度所最大保存的Timer定时器个数
*/.
返回1970-1-1至今经历的毫秒数.
# Constants
ms为精度.
No description provided by the author
No description provided by the author
默认缓冲触发函数队列大小.
默认最大误差时间.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
每个时间轮刻度挂载定时器的最大个数.
# Structs
定义一个延迟调用函数
延迟调用函数就是 时间定时器超时的时候,触发的事先注册好的
回调函数
*/.
定时器实现
*/.
No description provided by the author
No description provided by the author