async-tick

Crates.ioasync-tick
lib.rsasync-tick
version0.1.8
sourcesrc
created_at2022-02-23 06:26:28.19948
updated_at2022-09-13 01:48:59.476254
descriptiontick clock
homepage
repositoryhttps://github.com/rise0chen/clock_source.git
max_upload_size
id537664
size19,821
Rise Chen (rise0chen)

documentation

README

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
}
Commit count: 19

cargo fmt