#timer #pure #scalable #insert #structure #first

timer-queue

纯、最小化且可扩展的计时器

2个不稳定版本

0.1.0 2022年11月11日
0.0.0 2022年9月28日

#20 in #scalable

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

每月480次下载

MIT OR Apache-2.0 OR Zlib

27KB
445 代码行数(不包括注释)

timer-queue

License: Apache 2.0 License: MIT License: Zlib

用于跟踪计时器到期的纯、最小化和可扩展的结构

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"));

许可

许可于以下之一

根据您的选择。

贡献

除非您明确声明,否则根据Apache-2.0许可证定义的您提交的任何贡献,均应按照上述方式进行三重许可,不附加任何额外条款或条件。

依赖

~45KB