8 releases

0.1.8 Sep 13, 2022
0.1.7 Apr 22, 2022
0.1.5 Mar 11, 2022
0.1.1 Feb 23, 2022
Download history 17/week @ 2022-06-12 13/week @ 2022-06-19 17/week @ 2022-06-26 20/week @ 2022-07-03 20/week @ 2022-07-10 18/week @ 2022-07-17 44/week @ 2022-07-24 38/week @ 2022-07-31 24/week @ 2022-08-07 17/week @ 2022-08-14 22/week @ 2022-08-21 28/week @ 2022-08-28 40/week @ 2022-09-04 45/week @ 2022-09-11 25/week @ 2022-09-18 20/week @ 2022-09-25

133 downloads per month
Used in 3 crates (2 directly)

Custom license

15KB
264 lines

async-tick

Usage

Add this to your Cargo.toml:

[dependencies]
async-tick = "*"
use core::time::Duration;
async_tick::tick();
let now: u64 = async_tick::now();

async_tick::sleep(Duration::from_secs(1)).await;

let interval = async_tick::interval(Duration::from_secs(1));
while let Some(now) = interval.await{
    // task
}

Dependencies

~1MB
~19K SLoC