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.55 by jsr166, Sat Mar 26 16:18:25 2016 UTC vs.
Revision 1.56 by jsr166, Sat Mar 26 16:31:59 2016 UTC

# Line 46 | Line 46 | public enum TimeUnit {
46      /**
47       * Time unit representing one thousandth of a microsecond.
48       */
49 <    NANOSECONDS(1L), // (cannot use symbolic scale names here)
49 >    NANOSECONDS(TimeUnit.NANO_SCALE),
50      /**
51       * Time unit representing one thousandth of a millisecond.
52       */
53 <    MICROSECONDS(1000L),
53 >    MICROSECONDS(TimeUnit.MICRO_SCALE),
54      /**
55       * Time unit representing one thousandth of a second.
56       */
57 <    MILLISECONDS(1000L * 1000L),
57 >    MILLISECONDS(TimeUnit.MILLI_SCALE),
58      /**
59       * Time unit representing one second.
60       */
61 <    SECONDS(1000L * 1000L * 1000L),
61 >    SECONDS(TimeUnit.SECOND_SCALE),
62      /**
63       * Time unit representing sixty seconds.
64       * @since 1.6
65       */
66 <    MINUTES(1000L * 1000L * 1000L * 60L),
66 >    MINUTES(TimeUnit.MINUTE_SCALE),
67      /**
68       * Time unit representing sixty minutes.
69       * @since 1.6
70       */
71 <    HOURS(1000L * 1000L * 1000L * 60L * 60L),
71 >    HOURS(TimeUnit.HOUR_SCALE),
72      /**
73       * Time unit representing twenty four hours.
74       * @since 1.6
75       */
76 <    DAYS(1000L * 1000L * 1000L * 60L * 60L * 24L);
76 >    DAYS(TimeUnit.DAY_SCALE);
77  
78      // Scales as constants
79      private static final long NANO_SCALE   = 1L;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines