11 releases (4 breaking)
new 0.5.0 | Feb 1, 2025 |
---|---|
0.4.1 | Jan 15, 2025 |
0.4.0 | Dec 20, 2024 |
0.3.0 | Dec 12, 2024 |
0.1.1 | Dec 11, 2024 |
#274 in Hardware support
427 downloads per month
37KB
591 lines
Fastimer
Overview
Fastimer implements runtime-agnostic driver for async timers and scheduled tasks.
Scheduled Actions
Fastimer provides multiple abstractions that can be scheduled as a repeating and cancellable action:
SimpleAction
: A simple action that can be scheduled with fixed delay or at fixed rate.ArbitraryDelayAction
: An action that can be scheduled with arbitrary delay.NotifyAction
: An 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.
Time Driver
TimeDriver
is a runtime-agnostic time driver for creating delay futures. To use the time driver, you need to enable the driver feature flag.
Installation
Add the dependency to your Cargo.toml
via:
cargo add fastimer
Documentation
Read the online documents at https://docs.rs/fastimer.
License
This project is licensed under Apache License, Version 2.0.
Dependencies
~0.3–6.5MB
~37K SLoC