| 395 |
public void refresh() {} |
public void refresh() {} |
| 396 |
} |
} |
| 397 |
|
|
| 398 |
|
/** |
| 399 |
|
* Sleep until the timeout has elapsed, or interrupted. |
| 400 |
|
* Does <em>NOT</em> throw InterruptedException. |
| 401 |
|
*/ |
| 402 |
|
void sleepTillInterrupted(long timeoutMillis) { |
| 403 |
|
try { |
| 404 |
|
Thread.sleep(timeoutMillis); |
| 405 |
|
} catch (InterruptedException wakeup) { |
| 406 |
|
} |
| 407 |
|
} |
| 408 |
|
|
| 409 |
|
/** |
| 410 |
|
* Returns a new started Thread running the given runnable. |
| 411 |
|
*/ |
| 412 |
|
Thread newStartedThread(Runnable runnable) { |
| 413 |
|
Thread t = new Thread(runnable); |
| 414 |
|
t.start(); |
| 415 |
|
return t; |
| 416 |
|
} |
| 417 |
|
|
| 418 |
// Some convenient Runnable classes |
// Some convenient Runnable classes |
| 419 |
|
|