Documentation
¶
Overview ¶
Package stopwatch provides a simple stopwatch component.
Index ¶
- type Model
- func (m Model) Elapsed() time.Duration
- func (m Model) Init() tea.Cmd
- func (m Model) Reset() tea.Cmd
- func (m Model) Running() bool
- func (m Model) Start() tea.Cmd
- func (m Model) Stop() tea.Cmd
- func (m Model) Toggle() tea.Cmd
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
- type TickMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// How long to wait before every tick. Defaults to 1 second.
Interval time.Duration
// contains filtered or unexported fields
}
Model of the timer component.
func NewWithInterval ¶
NewWithInterval creates a new stopwatch with the given timeout and tick interval.
Click to show internal directories.
Click to hide internal directories.