Fastimer implements runtime-agnostic timer traits and utilities.
Fastimer provides scheduled actions that can be scheduled as a repeating and cancellable action.
SimpleAction
: A simple repeatable action that can be scheduled with a fixed delay, or at a fixed rate.ArbitraryDelayAction
: A repeatable action that can be scheduled with arbitrary delay.NotifyAction
: A repeatable action that can be scheduled by notifications.
Timeout
is a future combinator that completes when the inner future completes or when the timeout expires.
Interval
ticks at a sequence of instants with a certain duration between each instant.
Add the dependency to your Cargo.toml
via:
cargo add fastimer
Read the online documents at https://docs.rs/fastimer.
This crate is built against the latest stable release, and its minimum supported rustc version is 1.80.0.
The policy is that the minimum Rust version required to use this crate can be increased in minor version updates. For example, if Fastimer 1.0 requires Rust 1.20.0, then Fastimer 1.0.z for all values of z will also require Rust 1.20.0 or newer. However, Fastimer 1.y for y > 0 may require a newer minimum version of Rust.
This project is licensed under Apache License, Version 2.0.