2 unstable releases

0.1.0 Nov 11, 2022
0.0.0 Sep 28, 2022

#971 in Data structures

Download history 2352/week @ 2024-10-01 2300/week @ 2024-10-08 3483/week @ 2024-10-15 3778/week @ 2024-10-22 4464/week @ 2024-10-29 5058/week @ 2024-11-05 4468/week @ 2024-11-12 4966/week @ 2024-11-19 4920/week @ 2024-11-26 5625/week @ 2024-12-03 5600/week @ 2024-12-10 3950/week @ 2024-12-17 81/week @ 2024-12-24 368/week @ 2024-12-31 2789/week @ 2025-01-07 845/week @ 2025-01-14

4,099 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

~45KB