mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-19 00:31:02 -04:00
3834c605e5
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
12 lines
291 B
Go
12 lines
291 B
Go
package time
|
|
|
|
import (
|
|
"strconv"
|
|
"time"
|
|
)
|
|
|
|
// DurationToSecondsString converts the specified duration to the number
|
|
// seconds it represents, formatted as a string.
|
|
func DurationToSecondsString(duration time.Duration) string {
|
|
return strconv.FormatFloat(duration.Seconds(), 'f', 0, 64)
|
|
}
|