fix(timer): restore 1s default interval

This commit is contained in:
Christian Rocha
2024-10-31 15:58:35 -04:00
parent 591dfd528e
commit cc9a727028
+4 -3
View File
@@ -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)