2023-07-21 13:33:56 -07:00
|
|
|
package llm
|
2023-07-07 15:29:17 -07:00
|
|
|
|
2023-07-19 12:47:15 -07:00
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"time"
|
|
|
|
)
|
2023-07-07 15:29:17 -07:00
|
|
|
|
2023-07-19 12:47:15 -07:00
|
|
|
func parseDurationMs(ms float64) time.Duration {
|
|
|
|
dur, err := time.ParseDuration(fmt.Sprintf("%fms", ms))
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
2023-07-07 15:29:17 -07:00
|
|
|
}
|
|
|
|
|
2023-07-19 12:47:15 -07:00
|
|
|
return dur
|
2023-07-07 15:29:17 -07:00
|
|
|
}
|