Expand description
Timer wheel for one-shot timeouts.
The wheel uses millisecond ticks, bucketed timer references, and an index map. Scheduling and cancellation update only one bucket/index entry each, giving O(1) insertion and cancellation without a sorted list, binary heap, or priority queue.
Structsยง
- Expired
Timer - Expired timer returned by
TimerWheel::tick/TimerWheel::tick_at. - Timer
Entry - Timer entry metadata stored in the wheel index.
- Timer
Ref - Unique timer reference used for cancellation.
- Timer
Wheel - Millisecond-granularity O(1) timer wheel for one-shot timers.