timer-rs 0.0.1

A simple timer used to schedule execution of closures at a given timestamp.
Documentation

Timer

Simple implementation of a Timer in async Rust.

Example

fn main() {
    let timer = Timer::new(
        callback,
        notify_shutdown.subscribe().into(),
    );

    timer.schedule(Utc::now().naive_utc());

    timer.await;
}

fn callback() -> Option<NaiveDateTime> {
    println!("Hello, World!");
    None
}