2 unstable releases

0.1.0 Nov 11, 2022
0.0.0 Sep 28, 2022

#1141 in Data structures

Download history 4706/week @ 2024-11-22 5234/week @ 2024-11-29 5993/week @ 2024-12-06 5046/week @ 2024-12-13 849/week @ 2024-12-20 133/week @ 2024-12-27 2122/week @ 2025-01-03 1730/week @ 2025-01-10 142/week @ 2025-01-17 110/week @ 2025-01-24 112/week @ 2025-01-31 129/week @ 2025-02-07 109/week @ 2025-02-14 90/week @ 2025-02-21 100/week @ 2025-02-28 73/week @ 2025-03-07

397 downloads per month

MIT OR Apache-2.0 OR Zlib

27KB
445 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

~46KB