-
Notifications
You must be signed in to change notification settings - Fork 356
Open
Description
Describe the bug
In v2, creating a stopwatch with stopwatch.New() (and no stopwatch.WithInterval argument) creates a stopwatch with an interval of 0, which causes some problems as the elapsed time never increases.
Source Code
bubbles/stopwatch/stopwatch.go
Lines 65 to 75 in 84a82df
| // New creates a new stopwatch with 1s interval. | |
| func New(opts ...Option) Model { | |
| m := Model{ | |
| id: nextID(), | |
| } | |
| for _, opt := range opts { | |
| opt(&m) | |
| } | |
| return m | |
| } |
Expected behavior
According to the documentation, the interval should default to 1 second.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels