timer-queue

Crates.iotimer-queue
lib.rstimer-queue
version0.1.0
sourcesrc
created_at2022-09-28 04:05:34.670803
updated_at2022-11-11 17:31:04.31013
descriptionPure, minimal, and scalable timers
homepage
repositoryhttps://github.com/Ralith/timer-queue
max_upload_size
id675409
size42,873
Benjamin Saunders (Ralith)

documentation

README

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.

Commit count: 6

cargo fmt