ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/TimeUnit.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/TimeUnit.java (file contents):
Revision 1.64 by jsr166, Tue Jun 5 22:26:54 2018 UTC vs.
Revision 1.65 by jsr166, Fri Jun 8 18:53:49 2018 UTC

# 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,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines