Skip to main content

Crate okee_wheel_timer

Crate okee_wheel_timer 

Source
Expand description

Deterministic single-level hashed wheel timers.

The crate provides two timer variants:

Typical processing loop:

use okee_wheel_timer::HashedWheelTimer;

let mut wheel = HashedWheelTimer::new(8);
let _ = wheel.schedule(0, "payload");

while wheel.has_events_in_current_tick() {
    let _events = wheel.pop_events();
}
wheel.step();

Re-exports§

pub use event::Event;
pub use event::EventId;
pub use keyed_time_wheel::KeyedHashedWheelTimer;
pub use keyed_time_wheel::KeyedScheduleResult;
pub use keyed_time_wheel::KeyedUpdateResult;
pub use time_wheel::HashedWheelTimer;
pub use time_wheel::ScheduleResult;
pub use time_wheel::TimeWheelError;
pub use time_wheel::UpdateResult;

Modules§

event
keyed_time_wheel
Keyed wrapper over the core hashed wheel timer.
time_wheel
Core hashed wheel timer implementation.