Documentation
¶
Overview ¶
Package timer provides a simple timeout component.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// How long until the timer expires.
Timeout time.Duration
// How long to wait before every tick. Defaults to 1 second.
Interval time.Duration
}
Model of the timer component.
func NewWithInterval ¶
NewWithInterval creates a new timer with the given timeout and tick interval.
type TimeoutMsg ¶
type TimeoutMsg struct{}
TimeoutMsg is a message that is sent once when the timer times out.
Click to show internal directories.
Click to hide internal directories.