41 |
|
*/ |
42 |
|
public enum TimeUnit { |
43 |
|
/** |
44 |
< |
* Time unit representing one thousandth of a microsecond |
44 |
> |
* Time unit representing one thousandth of a microsecond. |
45 |
|
*/ |
46 |
|
NANOSECONDS { |
47 |
|
public long toNanos(long d) { return d; } |
56 |
|
}, |
57 |
|
|
58 |
|
/** |
59 |
< |
* Time unit representing one thousandth of a millisecond |
59 |
> |
* Time unit representing one thousandth of a millisecond. |
60 |
|
*/ |
61 |
|
MICROSECONDS { |
62 |
|
public long toNanos(long d) { return x(d, C1/C0, MAX/(C1/C0)); } |
71 |
|
}, |
72 |
|
|
73 |
|
/** |
74 |
< |
* Time unit representing one thousandth of a second |
74 |
> |
* Time unit representing one thousandth of a second. |
75 |
|
*/ |
76 |
|
MILLISECONDS { |
77 |
|
public long toNanos(long d) { return x(d, C2/C0, MAX/(C2/C0)); } |
86 |
|
}, |
87 |
|
|
88 |
|
/** |
89 |
< |
* Time unit representing one second |
89 |
> |
* Time unit representing one second. |
90 |
|
*/ |
91 |
|
SECONDS { |
92 |
|
public long toNanos(long d) { return x(d, C3/C0, MAX/(C3/C0)); } |
101 |
|
}, |
102 |
|
|
103 |
|
/** |
104 |
< |
* Time unit representing sixty seconds |
104 |
> |
* Time unit representing sixty seconds. |
105 |
|
* @since 1.6 |
106 |
|
*/ |
107 |
|
MINUTES { |
117 |
|
}, |
118 |
|
|
119 |
|
/** |
120 |
< |
* Time unit representing sixty minutes |
120 |
> |
* Time unit representing sixty minutes. |
121 |
|
* @since 1.6 |
122 |
|
*/ |
123 |
|
HOURS { |
133 |
|
}, |
134 |
|
|
135 |
|
/** |
136 |
< |
* Time unit representing twenty four hours |
136 |
> |
* Time unit representing twenty four hours. |
137 |
|
* @since 1.6 |
138 |
|
*/ |
139 |
|
DAYS { |