/** * Obtains the {@link Duration} amount in the specified {@link TimeUnit}. * * @param units the desired {@link TimeUnit} * * @return the amount measured in the specified {@link TimeUnit} */ public long to(TimeUnit units) { return units.convert(getAmount(), getUnits()); }
/** * Obtains the {@link Duration} amount in the specified {@link TimeUnit}. * * @param units the desired {@link TimeUnit} * * @return the amount measured in the specified {@link TimeUnit} */ public long to(TimeUnit units) { return units.convert(getAmount(), getUnits()); }
@Override public String toString() { return getAmount() + " " + getUnits().name(); }
@Override public String toString() { return getAmount() + " " + getUnits().name(); }