timer-rs

Crates.iotimer-rs
lib.rstimer-rs
version0.0.6
sourcesrc
created_at2023-07-27 11:22:30.558882
updated_at2023-08-21 17:55:17.857156
descriptionA simple timer used to schedule execution of closures at a given timestamp.
homepage
repositoryhttps://github.com/ruanpetterson/timer-rs
max_upload_size
id927316
size39,297
Ruan Petterson (ruanpetterson)

documentation

README

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;
Commit count: 22

cargo fmt