Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
In all respects, this method behaves as if
had been called. See the specification of the
wait(long, int) method
|the maximum time to wait, in milliseconds|
| if the value of |
|if the current thread is not the owner of the object's monitor|
|if any thread interrupted the current thread before or while the current thread was waiting. The interrupted status of the current thread is cleared when this exception is thrown.|