116 |
|
} |
117 |
|
|
118 |
|
/** |
119 |
< |
* Convert the given time duration in the given unit to the |
120 |
< |
* current unit. Conversions from finer to coarser granularities |
119 |
> |
* Convert the given time duration in the given unit to this |
120 |
> |
* unit. Conversions from finer to coarser granularities |
121 |
|
* truncate, so lose precision. For example converting |
122 |
|
* <tt>999</tt> milliseconds to seconds results in |
123 |
|
* <tt>0</tt>. Conversions from coarser to finer granularities |
127 |
|
* |
128 |
|
* @param duration the time duration in the given <tt>unit</tt> |
129 |
|
* @param unit the unit of the <tt>duration</tt> argument |
130 |
< |
* @return the converted duration in the current unit, |
130 |
> |
* @return the converted duration in this unit, |
131 |
|
* or <tt>Long.MIN_VALUE</tt> if conversion would negatively |
132 |
|
* overflow, or <tt>Long.MAX_VALUE</tt> if it would positively overflow. |
133 |
|
*/ |
182 |
|
} |
183 |
|
|
184 |
|
/** |
185 |
< |
* Perform a timed <tt>Object.wait</tt> using the current time unit. |
185 |
> |
* Perform a timed <tt>Object.wait</tt> using this time unit. |
186 |
|
* This is a convenience method that converts timeout arguments into the |
187 |
|
* form required by the <tt>Object.wait</tt> method. |
188 |
|
* <p>For example, you could implement a blocking <tt>poll</tt> method (see |
208 |
|
} |
209 |
|
|
210 |
|
/** |
211 |
< |
* Perform a timed <tt>Thread.join</tt> using the current time unit. |
211 |
> |
* Perform a timed <tt>Thread.join</tt> using this time unit. |
212 |
|
* This is a convenience method that converts time arguments into the |
213 |
|
* form required by the <tt>Thread.join</tt> method. |
214 |
|
* @param thread the thread to wait for |
226 |
|
} |
227 |
|
|
228 |
|
/** |
229 |
< |
* Perform a <tt>Thread.sleep</tt> using the current time unit. |
229 |
> |
* Perform a <tt>Thread.sleep</tt> using this unit. |
230 |
|
* This is a convenience method that converts time arguments into the |
231 |
|
* form required by the <tt>Thread.sleep</tt> method. |
232 |
|
* @param timeout the minimum time to sleep |