2 unstable releases
0.7.0 | Feb 10, 2025 |
---|---|
0.6.0 | Feb 5, 2025 |
#370 in Asynchronous
248 downloads per month
52KB
708 lines
Fastimer
Overview
Fastimer implements runtime-agnostic timer traits and utilities.
Scheduled Actions
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
Timeout
is a future combinator that completes when the inner future completes or when the timeout expires.
Interval
Interval
ticks at a sequence of instants with a certain duration between each instant.
Installation
Add the dependency to your Cargo.toml
via:
cargo add fastimer
Documentation
Read the online documents at https://docs.rs/fastimer.
Minimum Supported Rust Version (MSRV)
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.
License
This project is licensed under Apache License, Version 2.0.
Dependencies
~0.4–0.9MB
~17K SLoC