1237 |
|
* Sleeps until the given time has elapsed. |
1238 |
|
* Throws AssertionFailedError if interrupted. |
1239 |
|
*/ |
1240 |
< |
void sleep(long millis) { |
1240 |
> |
static void sleep(long millis) { |
1241 |
|
try { |
1242 |
|
delay(millis); |
1243 |
|
} catch (InterruptedException fail) { |
1756 |
|
* A CyclicBarrier that uses timed await and fails with |
1757 |
|
* AssertionFailedErrors instead of throwing checked exceptions. |
1758 |
|
*/ |
1759 |
< |
public class CheckedBarrier extends CyclicBarrier { |
1759 |
> |
public static class CheckedBarrier extends CyclicBarrier { |
1760 |
|
public CheckedBarrier(int parties) { super(parties); } |
1761 |
|
|
1762 |
|
public int await() { |