mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-12 06:11:03 -04:00
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)
|
|
}
|