Some checks failed
CodeQL / Analyze (go) (push) Successful in 6m28s
Docker Image / build-docker (push) Failing after 13m26s
Lint and Testing / lint (push) Successful in 11m17s
Lint and Testing / test (push) Successful in 11m17s
Lint and Testing / golangci (push) Successful in 2m40s
16 lines
283 B
Go
16 lines
283 B
Go
package whisper
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
func srtTimestamp(t time.Duration) string {
|
|
return fmt.Sprintf("%02d:%02d:%02d,%03d",
|
|
t/time.Hour,
|
|
(t%time.Hour)/time.Minute,
|
|
(t%time.Minute)/time.Second,
|
|
(t%time.Second)/time.Millisecond,
|
|
)
|
|
}
|