148 |
|
final CountDownLatch done = new CountDownLatch(cycles); |
149 |
|
CheckedRunnable task = new CheckedRunnable() { |
150 |
|
public void realRun() { done.countDown(); }}; |
151 |
– |
|
151 |
|
ScheduledFuture h = |
152 |
|
p.scheduleAtFixedRate(task, 0, delay, MILLISECONDS); |
153 |
|
done.await(); |
176 |
|
final CountDownLatch done = new CountDownLatch(cycles); |
177 |
|
CheckedRunnable task = new CheckedRunnable() { |
178 |
|
public void realRun() { done.countDown(); }}; |
180 |
– |
|
179 |
|
ScheduledFuture h = |
180 |
|
p.scheduleWithFixedDelay(task, 0, delay, MILLISECONDS); |
181 |
|
done.await(); |