MCPcopy
hub / github.com/aceld/zinx / AddTimeWheel

Method AddTimeWheel

ztimer/timewheel.go:153–156  ·  view source on GitHub ↗

AddTimeWheel 给一个时间轮添加下层时间轮 比如给小时时间轮添加分钟时间轮,给分钟时间轮添加秒时间轮

(next *TimeWheel)

Source from the content-addressed store, hash-verified

151
152// AddTimeWheel 给一个时间轮添加下层时间轮 比如给小时时间轮添加分钟时间轮,给分钟时间轮添加秒时间轮
153func (tw *TimeWheel) AddTimeWheel(next *TimeWheel) {
154 tw.nextTimeWheel = next
155 zlog.Ins().InfoF("Add timerWhell[%s]'s next [%s] is succ!", tw.name, next.name)
156}
157
158/*
159启动时间轮

Callers 2

TestTimerWheelFunction · 0.95
NewTimerSchedulerFunction · 0.95

Calls 2

InsFunction · 0.92
InfoFMethod · 0.65

Tested by 1

TestTimerWheelFunction · 0.76