refactor UI for better separation

This commit is contained in:
Drew Weymouth
2022-12-24 16:47:00 -08:00
parent 5c644faeaf
commit cefb25133e
8 changed files with 99 additions and 79 deletions
+16
View File
@@ -0,0 +1,16 @@
package util
import (
"fmt"
"math"
)
func SecondsToTimeString(s float64) string {
if s < 0 {
s = 0
}
min := int(s / 60)
sec := int(math.Round(s - float64(min*60)))
return fmt.Sprintf("%2d:%02d", min, sec)
}