# | Line 173 | Line 173 | public enum TimeUnit { | |
---|---|---|
173 | * {@code unit.convert(Duration.of(n, unit.toChronoUnit()))} | |
174 | * is equivalent to {@code n} (in the absence of overflow). | |
175 | * | |
176 | + | * <p>This method differs from {@link Duration#toNanos()} in that |
177 | + | * it does not throw {@link ArithmeticException} on numeric overflow. |
178 | + | * |
179 | * @param duration the time duration | |
180 | * @return the converted duration in this unit, | |
181 | * or {@code Long.MIN_VALUE} if conversion would negatively overflow, |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |