Doc comments, optimizations, and magic number removal

This commit is contained in:
Christian Rocha
2020-11-18 18:17:27 -05:00
committed by Christian Rocha
parent b78277e7ec
commit 47b8d9c6a8
2 changed files with 12 additions and 8 deletions

View File

@@ -11,7 +11,8 @@ import (
)
const (
stepSize float64 = 1.0 / (60.0 * 2.0)
fps = 60
stepSize float64 = 1.0 / (float64(fps) * 2.0)
padding = 2
maxWidth = 80
)
@@ -75,7 +76,7 @@ func (e example) View() string {
}
func tickCmd() tea.Cmd {
return tea.Tick(time.Second/60, func(t time.Time) tea.Msg {
return tea.Tick(time.Second/fps, func(t time.Time) tea.Msg {
return tickMsg(t)
})
}