3 unstable releases

0.1.1 Jun 18, 2025
0.1.0 Nov 11, 2022
0.0.0 Sep 28, 2022

#741 in Data structures

Download history 241/week @ 2025-07-09 253/week @ 2025-07-16 221/week @ 2025-07-23 528/week @ 2025-07-30 370/week @ 2025-08-06 484/week @ 2025-08-13 450/week @ 2025-08-20 366/week @ 2025-08-27 496/week @ 2025-09-03 954/week @ 2025-09-10 628/week @ 2025-09-17 519/week @ 2025-09-24 391/week @ 2025-10-01 174/week @ 2025-10-08 158/week @ 2025-10-15 196/week @ 2025-10-22

1,022 downloads per month

MIT OR Apache-2.0 OR Zlib

31KB
545 lines

timer-queue

License: Apache 2.0 License: MIT License: Zlib

A pure, minimal, and scalable structure for tracking expiration of timers

let mut q = TimerQueue::new();
q.insert(42, "second");
q.insert(17, "first");
assert!(q.next_timeout().unwrap() <= 17);
assert_eq!(q.poll(16), None);
assert_eq!(q.poll(17), Some("first"));
assert_eq!(q.poll(100), Some("second"));

License

Licensed under any of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be triple licensed as above, without any additional terms or conditions.

Dependencies

~210KB