async_timing_util

Crates.ioasync_timing_util
lib.rsasync_timing_util
version1.0.0
sourcesrc
created_at2022-09-02 14:15:30.49008
updated_at2024-07-03 23:58:10.496073
descriptiontokio async functions for waiting until even intervals (on 1 min, 5 min, 30 min, etc), or waiting until a specified timestamp
homepage
repository
max_upload_size
id657402
size8,648
Maxwell Becker (mbecker20)

documentation

README

Async Timing Util

Convenient utilities for doing repeated tasks at precise intervals.

use async_timing_util::{Timelength, wait_until_timelength};

loop {
    let ts = wait_until_timelength(Timelength::OneHour, 0).await;
    /// Do something async every hour, on the hour.
		/// Runs at 00:00, 01:00, 02:00, etc.
}
Commit count: 0

cargo fmt