2 unstable releases

0.1.0 Nov 11, 2022
0.0.0 Sep 28, 2022

#20 in #scalable

Download history 196/week @ 2024-04-08 156/week @ 2024-04-15 151/week @ 2024-04-22 123/week @ 2024-04-29 130/week @ 2024-05-06 162/week @ 2024-05-13 159/week @ 2024-05-20 130/week @ 2024-05-27 117/week @ 2024-06-03 148/week @ 2024-06-10 140/week @ 2024-06-17 135/week @ 2024-06-24 118/week @ 2024-07-01 133/week @ 2024-07-08 140/week @ 2024-07-15 76/week @ 2024-07-22

480 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