79 |
|
/** |
80 |
|
* Perform a timed <tt>Object.wait</tt> using the current time unit. |
81 |
|
* This is a convenience method that converts timeout arguments into the |
82 |
< |
* form required by the <tt>Object.wait</tt> method. |
82 |
> |
* form required by the <tt>Object.wait</tt> method. |
83 |
|
* <p>For example, you could implement a blocking <tt>poll</tt> method (see |
84 |
|
* {@link BlockingQueue#poll BlockingQueue.poll} using: |
85 |
|
* <pre> public synchronized Object poll(long timeout, TimeUnit unit) throws InterruptedException { |
147 |
|
|
148 |
|
/** |
149 |
|
* Utility method to compute the excess-nanosecond argument to |
150 |
< |
* wait, sleep, join. |
151 |
< |
* @fixme overflow? |
150 |
> |
* wait, sleep, join. The results may overflow, so public methods |
151 |
> |
* invoking this should document possible overflow unless |
152 |
> |
* overflow is known not to be possible for the given arguments. |
153 |
|
*/ |
154 |
|
private int excessNanos(long time, long ms) { |
155 |
|
if (index == NS) |