MCPcopy Create free account
hub / github.com/Cyinx/einx / nextWake

Method nextWake

timer/timer_wheel.go:94–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92}
93
94func (this *timerWheel) nextWake() int {
95 wakeDelay := 0
96 wakeIndex := this.index
97 for wakeDelay < 64 {
98 timer_list := this.array[wakeIndex]
99 if timer_list.head != nil {
100 break
101 }
102 if wakeIndex++; wakeIndex == 0 {
103 break
104 }
105 wakeDelay++
106 }
107 return wakeDelay
108}
109
110func (this *timerWheel) TurnWheel() {
111 if this.prev_wheel == nil {

Callers 1

ExecuteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected