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.57 by jsr166, Sat Mar 26 16:40:51 2016 UTC vs.
Revision 1.58 by jsr166, Sat Mar 26 17:05:48 2016 UTC

# Line 149 | Line 149 | public enum TimeUnit {
149       * @param sourceDuration the time duration in the given {@code sourceUnit}
150       * @param sourceUnit the unit of the {@code sourceDuration} argument
151       * @return the converted duration in this unit,
152 <     * or {@code Long.MIN_VALUE} if conversion would negatively
153 <     * overflow, or {@code Long.MAX_VALUE} if it would positively overflow.
152 >     * or {@code Long.MIN_VALUE} if conversion would negatively overflow,
153 >     * or {@code Long.MAX_VALUE} if it would positively overflow.
154       */
155      public long convert(long sourceDuration, TimeUnit sourceUnit) {
156          switch (this) {
# Line 167 | Line 167 | public enum TimeUnit {
167       * {@link #convert(long, TimeUnit) NANOSECONDS.convert(duration, this)}.
168       * @param duration the duration
169       * @return the converted duration,
170 <     * or {@code Long.MIN_VALUE} if conversion would negatively
171 <     * overflow, or {@code Long.MAX_VALUE} if it would positively overflow.
170 >     * or {@code Long.MIN_VALUE} if conversion would negatively overflow,
171 >     * or {@code Long.MAX_VALUE} if it would positively overflow.
172       */
173      public long toNanos(long duration) {
174          long s, m;
# Line 187 | Line 187 | public enum TimeUnit {
187       * {@link #convert(long, TimeUnit) MICROSECONDS.convert(duration, this)}.
188       * @param duration the duration
189       * @return the converted duration,
190 <     * or {@code Long.MIN_VALUE} if conversion would negatively
191 <     * overflow, or {@code Long.MAX_VALUE} if it would positively overflow.
190 >     * or {@code Long.MIN_VALUE} if conversion would negatively overflow,
191 >     * or {@code Long.MAX_VALUE} if it would positively overflow.
192       */
193      public long toMicros(long duration) {
194          long s, m;
# Line 209 | Line 209 | public enum TimeUnit {
209       * {@link #convert(long, TimeUnit) MILLISECONDS.convert(duration, this)}.
210       * @param duration the duration
211       * @return the converted duration,
212 <     * or {@code Long.MIN_VALUE} if conversion would negatively
213 <     * overflow, or {@code Long.MAX_VALUE} if it would positively overflow.
212 >     * or {@code Long.MIN_VALUE} if conversion would negatively overflow,
213 >     * or {@code Long.MAX_VALUE} if it would positively overflow.
214       */
215      public long toMillis(long duration) {
216          long s, m;
# Line 231 | Line 231 | public enum TimeUnit {
231       * {@link #convert(long, TimeUnit) SECONDS.convert(duration, this)}.
232       * @param duration the duration
233       * @return the converted duration,
234 <     * or {@code Long.MIN_VALUE} if conversion would negatively
235 <     * overflow, or {@code Long.MAX_VALUE} if it would positively overflow.
234 >     * or {@code Long.MIN_VALUE} if conversion would negatively overflow,
235 >     * or {@code Long.MAX_VALUE} if it would positively overflow.
236       */
237      public long toSeconds(long duration) {
238          long s, m;
# Line 253 | Line 253 | public enum TimeUnit {
253       * {@link #convert(long, TimeUnit) MINUTES.convert(duration, this)}.
254       * @param duration the duration
255       * @return the converted duration,
256 <     * or {@code Long.MIN_VALUE} if conversion would negatively
257 <     * overflow, or {@code Long.MAX_VALUE} if it would positively overflow.
256 >     * or {@code Long.MIN_VALUE} if conversion would negatively overflow,
257 >     * or {@code Long.MAX_VALUE} if it would positively overflow.
258       * @since 1.6
259       */
260      public long toMinutes(long duration) {
# Line 266 | Line 266 | public enum TimeUnit {
266       * {@link #convert(long, TimeUnit) HOURS.convert(duration, this)}.
267       * @param duration the duration
268       * @return the converted duration,
269 <     * or {@code Long.MIN_VALUE} if conversion would negatively
270 <     * overflow, or {@code Long.MAX_VALUE} if it would positively overflow.
269 >     * or {@code Long.MIN_VALUE} if conversion would negatively overflow,
270 >     * or {@code Long.MAX_VALUE} if it would positively overflow.
271       * @since 1.6
272       */
273      public long toHours(long duration) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines