#scheduled #timer #action #driver #tasks #async #delay

fastimer

This crate implements runtime-agnostic driver for async timers and scheduled tasks

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

Download history 789/week @ 2024-12-11 229/week @ 2024-12-18 144/week @ 2024-12-25 136/week @ 2025-01-01 82/week @ 2025-01-08 181/week @ 2025-01-15 15/week @ 2025-01-22

427 downloads per month

Apache-2.0

37KB
591 lines

Fastimer

Crates.io Documentation MSRV 1.83 Apache 2.0 licensed Build Status

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