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 astop()
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 astop()
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 astop()
method that can be used to stop the execution of the action.
Structs
- A
Duration
type to represent a span of time, typically used for system timeouts. - An ticker that can be stopped at anytime, returned from the
free_animation_interval!
andfree_interval!
macros. - A timeout that can be stopped at anytime, returned from the
free_timeout!
macro. - A measurement of a monotonically nondecreasing clock. Opaque and useful only with
Duration
.
Functions
- Creates a new
Ticker
that yields with ticker ofperiod
. The first tick completes immediately, meant for animations. - Creates a new
Ticker
that yields with ticker ofperiod
with the first tick completing atstart
, meant for animations. - Creates a new
Ticker
that yields with ticker ofperiod
. The first tick completes immediately. - Asynchronously waits until
duration
has elapsed. - Asynchronously waits until
deadline
is reached.