alice-lg/pkg/http/timeconv.go
2021-10-27 17:54:51 +00:00

11 lines
195 B
Go

package http
import (
"time"
)
// DurationMs converts time.Duration to milliseconds
func DurationMs(d time.Duration) float64 {
return float64(d) / 1000.0 / 1000.0 // nano -> micro -> milli
}