// parseDuration parses a duration in the format of "05 Days,21 Hours,33 Minutes,44 Seconds"
// Example
parseDuration parses a duration in the format of "05 Days,21 Hours,33 Minutes,44 Seconds"
Example
// parseDuration parses a duration in the format of " 05 Days 21 Hours 33 Minutes 44 Seconds " // Example
func parseLeaseDuration(raw string) float64 {
	var days, hours, minutes, seconds time.Duration
	_, err := fmt.Sscanf(raw, "D: %2d H: %2d M: %2d S:%2d", &days, &hours, &minutes, &seconds)
	if err != nil {
		log.Warn("Unknown uptime format: ", err, " ", raw)
		return -1
	}
	return float64(seconds +
		minutes*60 +
		hours*3600 +
		days*24*3600)
}
func parseLeaseDuration ( raw string ) float64 { var days , hours , minutes , seconds time . Duration _ , err := fmt . Sscanf ( raw , " " , & days , & hours , & minutes , & seconds ) if err != nil { log . Warn ( " " , err , " " , raw ) return - 1 } return float64 ( seconds + minutes * 60 + hours * 3600 + days * 24 * 3600 ) }
parseDuration parses a duration in the format of "05 Days,21 Hours,33 Minutes,44 Seconds"
Example
parseDuration parses a duration in the format of " 05 Days 21 Hours 33 Minutes 44 Seconds " Example