in atlas-core/src/main/scala/com/netflix/atlas/core/util/Strings.scala [612:621]
def toString(d: Duration): String = {
d.toMillis match {
case t if t % oneWeek == 0 => s"${t / oneWeek}w"
case t if t % oneDay == 0 => s"${t / oneDay}d"
case t if t % oneHour == 0 => s"${t / oneHour}h"
case t if t % oneMinute == 0 => s"${t / oneMinute}m"
case t if t % oneSecond == 0 => s"${t / oneSecond}s"
case _ => d.toString
}
}