repr.go 172 B

12345678910
  1. package timex
  2. import (
  3. "fmt"
  4. "time"
  5. )
  6. func ReprOfDuration(duration time.Duration) string {
  7. return fmt.Sprintf("%.1fms", float32(duration)/float32(time.Millisecond))
  8. }