Module agera::timer

source ·
Expand description

Work with timing and ticking.

Macros

  • Executes a given function after each period using an animation ticker. This macro returns a FreeInterval object with a stop() method that can be used to stop the execution of the function and dispose of the ticker.
  • Executes a given function after each period using a regular ticker. This macro returns a FreeInterval object with a stop() method that can be used to stop the execution of the function and dispose of the ticker.
  • Executes an action after some elapsed time. This macro returns a FreeTimeout object with a stop() method that can be used to stop the execution of the action.

Structs

Functions

  • Creates a new Ticker that yields with ticker of period. The first tick completes immediately, meant for animations.
  • Creates a new Ticker that yields with ticker of period with the first tick completing at start, meant for animations.
  • Creates a new Ticker that yields with ticker of period. The first tick completes immediately.
  • Creates a new Ticker that yields with ticker of period with the first tick completing at start.
  • Asynchronously waits until duration has elapsed.
  • Asynchronously waits until deadline is reached.