mirror of
https://github.com/onyx-and-iris/gobs-cli.git
synced 2026-04-18 07:03:37 +00:00
parse timeStr function now returns milliseconds.
This commit is contained in:
4
util.go
4
util.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user