parse timeStr function now returns milliseconds.

This commit is contained in:
2026-01-09 19:04:59 +00:00
parent f6fbf3c81f
commit a652b44992
2 changed files with 10 additions and 4 deletions

View File

@@ -39,7 +39,7 @@ func trimPrefix(s, prefix string) string {
return s
}
func parseTimeStringToSeconds(timeStr string) (float64, error) {
func parseTimeStringToMilliseconds(timeStr string) (float64, error) {
parts := strings.Split(timeStr, ":")
var durationStr string
@@ -62,5 +62,5 @@ func parseTimeStringToSeconds(timeStr string) (float64, error) {
return 0, fmt.Errorf("failed to parse duration: %w", err)
}
return duration.Seconds(), nil
return duration.Seconds() * 1000, nil
}