2 unstable releases
new 0.2.0 | Apr 25, 2024 |
---|---|
0.1.0 | Aug 30, 2023 |
#28 in #schedule
236 downloads per month
13KB
190 lines
Timer
Simple implementation of a Timer in async Rust.
Example
let task = || {
eprintln!("task was executed");
None
};
let timer = Timer::new(task).with_graceful_shutdown(signal::ctrl_c());
timer.await;
lib.rs
:
A simple timer, used to enqueue operations meant to be executed at a given time or after a given delay.
Dependencies
~4–6.5MB
~107K SLoC