charmbracelet / charmbracelet/bubbles
v2: Stopwatch doesn't default to 1 second as documented
Open
- Dominant language
- Go
- Stars
- 8.9k
- Forks
- 457
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 5
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**
https://github.com/charmbracelet/bubbles/blob/84a82dfeeed8089e0b9fd23a6344930b4f75eaf7/stopwatch/stopwatch.go#L65-L75
**Expected behavior**
According to the documentation, the interval should default to 1 second.
Contributor guide
Assessment
This issue has not been assessed yet.