Skip to content

Hash Wheel Timer

Timer facilities for Rust, built for distributed algorithms and testing with simulation time.

Motivation and approach

Distributed algorithms rely on timeouts and recurring events. A useful message-passing runtime needs timers, and a good timer facility must also support simulation time so that those algorithms can be tested without waiting for the wall clock.

The library uses a classical hierarchy of timer wheels, with optional overflow for periods beyond the wheels’ range. Configurable ticks allow fine time resolution while the hierarchy covers long periods. It supports one-off and periodic scheduling with real or explicitly controlled time.

My contribution

I built Hash Wheel Timer for Kompact and expanded its simulation support in 2026.

Outcome and current status

The library is available as a standalone Rust crate and continues to be maintained.