Skip to content

Commit

Permalink
fix(timer): restore 1s default interval
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm committed Oct 31, 2024
1 parent 591dfd5 commit cc9a727
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions timer/timer.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ type Model struct {
// New creates a new timer with the given timeout and default 1s interval.
func New(timeout time.Duration, opts ...Option) Model {
m := Model{
Timeout: timeout,
running: true,
id: nextID(),
Timeout: timeout,
Interval: time.Second,
running: true,
id: nextID(),
}
for _, opt := range opts {
opt(&m)
Expand Down

0 comments on commit cc9a727

Please sign in to comment.