func (t timeRounder) Nearest(d time.Duration) string {
	duration := time.Duration(t)
	str := "-"
	if t > 0 {
		// round to duration e.g. sec, min
		// easy trick with integer division
		duration /= d
		duration *= d

		str = duration.String()
	}
	return str
}
// Nearest rounds to the nearest duration and returns the string.
Nearest rounds to the nearest duration and returns the string.
// Nearest rounds to the nearest duration and returns the string .
func (t timeRounder) Nearest(d time.Duration) string {
	duration := time.Duration(t)
	str := "-"
	if t > 0 {
		duration /= d
		duration *= d
		str = duration.String()
	}
	return str
}
func ( t timeRounder ) Nearest ( d time . Duration ) string { duration := time . Duration ( t ) str := " " if t > 0 { duration /= d duration *= d str = duration . String ( ) } return str }
Nearest rounds to the nearest duration and returns the string.
Nearest rounds to the nearest duration and returns the string .
// round to duration e.g. sec, min // easy trick with integer division