()
| 92 | } |
| 93 | |
| 94 | func (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 | |
| 110 | func (this *timerWheel) TurnWheel() { |
| 111 | if this.prev_wheel == nil { |