Expand description
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.
Modules§
- schedule
- Repeatable and cancellable actions.
Structs§
- Elapsed
- Errors returned by
Timeout. - Interval
- Interval returned by
intervalandinterval_at. - Timeout
- A future that completes when the inner future completes or when the timeout expires.
Enums§
- Missed
Tick Behavior - Defines the behavior of an
Intervalwhen it misses a tick.
Traits§
- Make
Delay - A trait for creating delay futures.
- Make
Delay Ext - Provides extension methods for
MakeDelayimplementors. - Spawn
- A trait for spawning futures.
Functions§
- far_
future - Create a far future instant.
- interval
- Creates new
Intervalthat yields with interval ofperiod. The first tick completes immediately. The defaultMissedTickBehaviorisBurst, but this can be configured by callingset_missed_tick_behavior. - interval_
at - Creates new
Intervalthat yields with interval ofperiodwith the first tick completing atstart. The defaultMissedTickBehaviorisBurst, but this can be configured by callingset_missed_tick_behavior. - make_
instant_ from - Create an instant from the given instant and a duration.
- make_
instant_ from_ now - Create an instant from
Instant::nowand a duration. - timeout
- Requires a
Futureto complete before the specified duration has elapsed. - timeout_
at - Requires a
Futureto complete before the specified instant in time.