init: 1.0.0
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package timex
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
// ReprOfDuration returns the string representation of given duration in ms.
|
||||
func ReprOfDuration(duration time.Duration) string {
|
||||
return fmt.Sprintf("%.1fms", float32(duration)/float32(time.Millisecond))
|
||||
}
|
||||
Reference in New Issue
Block a user