#interval #min #async #tokio #timestamp #30

async_timing_util

tokio async functions for waiting until even intervals (on 1 min, 5 min, 30 min, etc), or waiting until a specified timestamp

17 releases (2 stable)

Uses new Rust 2024

1.1.0 Sep 29, 2025
1.0.0 Jul 3, 2024
0.1.14 Jan 18, 2023
0.1.12 Dec 11, 2022
0.1.2 Sep 19, 2022

#780 in Unix APIs

Download history 31/week @ 2025-12-25 25/week @ 2026-01-01 96/week @ 2026-01-08 23/week @ 2026-01-15 74/week @ 2026-01-22 28/week @ 2026-01-29 25/week @ 2026-02-05 92/week @ 2026-02-12 224/week @ 2026-02-19 65/week @ 2026-02-26 77/week @ 2026-03-05 43/week @ 2026-03-12 82/week @ 2026-03-19 95/week @ 2026-03-26 147/week @ 2026-04-02 92/week @ 2026-04-09

427 downloads per month
Used in 8 crates (6 directly)

MIT license

9KB
188 lines

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.
}

Dependencies

~2–3.5MB
~53K SLoC