Skip to main content

Module timer

Module timer 

Source
Expand description

Cleanroom Rust port of upstream Go source file: timer/timer.go Upstream Target Tag / Version: v2.1.0

# Timer

A simple timeout component.

Structs§

Model
Model of the timer component.
StartStopMsg
StartStopMsg is used to start and stop the timer.
TickMsg
TickMsg is a message that is sent on every timer tick.
TimeoutMsg
TimeoutMsg is a message that is sent once when the timer times out.

Functions§

new
New creates a new timer with the given timeout and default 1s interval.
with_interval
WithInterval is an option for setting the interval between ticks. Pass as an argument to new.

Type Aliases§

Option
Option is a configuration option in new. For example: