toAdjustedString
Truncates this Duration down to whole units and returns its Duration.toString form.
For example, 95.seconds.toAdjustedString(MINUTES) is "1m" while 95.seconds.toAdjustedString() (the default DurationUnit.SECONDS) is "1m 35s".
Return
the truncated duration formatted by Duration.toString
Parameters
unit
the coarsest unit to retain; defaults to DurationUnit.SECONDS
Throws
if unit is finer than DurationUnit.MILLISECONDS (i.e. microseconds or nanoseconds)