/libcore/ojluni/src/main/java/java/lang/ |
D | Object.java | 385 public final void wait(long timeoutMillis) throws InterruptedException { in wait() argument 386 wait(timeoutMillis, 0); in wait() 503 public final native void wait(long timeoutMillis, int nanos) throws InterruptedException; in wait() argument
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | CyclicBarrierTest.java | 186 c.await(timeoutMillis(), MILLISECONDS); in testAwait3_TimeoutException() 189 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testAwait3_TimeoutException() 213 c.await(timeoutMillis(), MILLISECONDS); in testAwait4_Timeout_BrokenBarrier() 216 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testAwait4_Timeout_BrokenBarrier() 241 c.await(timeoutMillis(), MILLISECONDS); in testAwait5_Timeout_BrokenBarrier() 244 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testAwait5_Timeout_BrokenBarrier() 322 delay(timeoutMillis()); in testReset_Leakage() 413 barrier.await(timeoutMillis(), MILLISECONDS); in testResetAfterTimeout() 416 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testResetAfterTimeout()
|
D | JSR166TestCase.java | 601 long timeoutMillis() { in timeoutMillis() method in JSR166TestCase 984 assertThreadStaysAlive(thread, timeoutMillis()); 1005 assertThreadsStayAlive(timeoutMillis(), threads); 1027 assertFutureTimesOut(future, timeoutMillis()); 1033 void assertFutureTimesOut(Future future, long timeoutMillis) { 1036 future.get(timeoutMillis, MILLISECONDS); 1042 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); 1212 void waitForThreadToEnterWaitState(Thread thread, long timeoutMillis) { 1222 else if (millisElapsedSince(startTime) > timeoutMillis) { 1236 Thread thread, long timeoutMillis, Callable<Boolean> waitingForGodot) { [all …]
|
D | ExecutorsTest.java | 212 timeoutMillis(), MILLISECONDS); in testNewSingleThreadScheduledExecutor() 219 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testNewSingleThreadScheduledExecutor() 236 timeoutMillis(), MILLISECONDS); in testNewScheduledThreadPool() 243 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testNewScheduledThreadPool() 262 timeoutMillis(), MILLISECONDS); in testUnconfigurableScheduledExecutorService() 269 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testUnconfigurableScheduledExecutorService()
|
D | ReentrantLockTest.java | 158 long timeoutMillis = 2 * LONG_DELAY_MS; in await() local 164 assertTrue(c.await(timeoutMillis, MILLISECONDS)); in await() 167 long timeoutNanos = MILLISECONDS.toNanos(timeoutMillis); in await() 173 assertTrue(c.awaitUntil(delayedDate(timeoutMillis))); in await() 411 long timeoutMillis = 10; in testTryLock_Timeout() 412 assertFalse(lock.tryLock(timeoutMillis, MILLISECONDS)); in testTryLock_Timeout() 413 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in testTryLock_Timeout() 536 long timeoutMillis = 10; 537 long timeoutNanos = MILLISECONDS.toNanos(timeoutMillis); 540 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); [all …]
|
D | AbstractQueuedLongSynchronizerTest.java | 217 long timeoutMillis = 2 * LONG_DELAY_MS; in await() local 223 assertTrue(c.await(timeoutMillis, MILLISECONDS)); in await() 226 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in await() 231 assertTrue(c.awaitUntil(delayedDate(timeoutMillis))); in await() 243 long timeoutMillis = timeoutMillis(); in assertAwaitTimesOut() local 249 assertFalse(c.await(timeoutMillis, MILLISECONDS)); in assertAwaitTimesOut() 250 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in assertAwaitTimesOut() 254 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in assertAwaitTimesOut() 258 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in assertAwaitTimesOut() 263 java.util.Date delayedDate = delayedDate(timeoutMillis()); in assertAwaitTimesOut() [all …]
|
D | AbstractQueuedSynchronizerTest.java | 220 long timeoutMillis = 2 * LONG_DELAY_MS; in await() local 226 assertTrue(c.await(timeoutMillis, MILLISECONDS)); in await() 229 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in await() 234 assertTrue(c.awaitUntil(delayedDate(timeoutMillis))); in await() 246 long timeoutMillis = timeoutMillis(); in assertAwaitTimesOut() local 252 assertFalse(c.await(timeoutMillis, MILLISECONDS)); in assertAwaitTimesOut() 253 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in assertAwaitTimesOut() 257 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in assertAwaitTimesOut() 261 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in assertAwaitTimesOut() 266 java.util.Date delayedDate = delayedDate(timeoutMillis()); in assertAwaitTimesOut() [all …]
|
D | SynchronousQueueTest.java | 199 assertFalse(q.offer(new Object(), timeoutMillis(), MILLISECONDS)); in testTimedOffer() 200 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedOffer() 243 try { assertNull(q.poll(timeoutMillis(), MILLISECONDS)); } in testTimedPoll() 245 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedPoll() 261 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPollWithOffer() 262 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedPollWithOffer()
|
D | ScheduledExecutorTest.java | 74 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule1() 77 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule1() 79 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule1() 95 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule3() 97 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule3() 100 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule3() 115 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule4() 118 p.scheduleAtFixedRate(task, timeoutMillis(), in testSchedule4() 121 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule4() 137 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule5() [all …]
|
D | ScheduledExecutorSubclassTest.java | 131 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule1() 134 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule1() 136 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule1() 151 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule3() 153 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule3() 156 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule3() 171 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule4() 174 p.scheduleAtFixedRate(task, timeoutMillis(), in testSchedule4() 177 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule4() 193 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule5() [all …]
|
D | ReentrantReadWriteLockTest.java | 167 long timeoutMillis = 2 * LONG_DELAY_MS; in await() local 173 assertTrue(c.await(timeoutMillis, MILLISECONDS)); in await() 176 long timeoutNanos = MILLISECONDS.toNanos(timeoutMillis); in await() 182 assertTrue(c.awaitUntil(delayedDate(timeoutMillis))); in await() 800 long timeoutMillis = 10; in testWriteTryLock_Timeout() 801 assertFalse(lock.writeLock().tryLock(timeoutMillis, MILLISECONDS)); in testWriteTryLock_Timeout() 802 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in testWriteTryLock_Timeout() 820 long timeoutMillis = 10; in testReadTryLock_Timeout() 821 assertFalse(lock.readLock().tryLock(timeoutMillis, MILLISECONDS)); in testReadTryLock_Timeout() 822 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in testReadTryLock_Timeout() [all …]
|
D | ExchangerTest.java | 115 e.exchange(null, timeoutMillis(), MILLISECONDS); in testExchange_TimeoutException() 118 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testExchange_TimeoutException()
|
D | LinkedBlockingDequeTest.java | 653 assertFalse(q.offer(new Object(), timeoutMillis(), MILLISECONDS)); in testTimedOffer() 654 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedOffer() 744 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll() 745 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedPoll() 883 assertFalse(q.offerFirst(new Object(), timeoutMillis(), MILLISECONDS)); in testTimedOfferFirst() 884 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedOfferFirst() 1045 assertNull(q.pollFirst(timeoutMillis(), MILLISECONDS)); in testTimedPollFirst() 1046 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedPollFirst() 1096 assertNull(q.pollFirst(timeoutMillis(), MILLISECONDS)); in testTimedPollFirstWithOfferFirst() 1097 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedPollFirstWithOfferFirst() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | CyclicBarrierTest.java | 207 c.await(timeoutMillis(), MILLISECONDS); in testAwait3_TimeoutException() 210 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testAwait3_TimeoutException() 234 c.await(timeoutMillis(), MILLISECONDS); in testAwait4_Timeout_BrokenBarrier() 237 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testAwait4_Timeout_BrokenBarrier() 262 c.await(timeoutMillis(), MILLISECONDS); in testAwait5_Timeout_BrokenBarrier() 265 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testAwait5_Timeout_BrokenBarrier() 343 delay(timeoutMillis()); in testReset_Leakage() 434 barrier.await(timeoutMillis(), MILLISECONDS); in testResetAfterTimeout() 437 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testResetAfterTimeout()
|
D | JSR166TestCase.java | 732 long timeoutMillis() { in timeoutMillis() method in JSR166TestCase 1135 assertThreadStaysAlive(thread, timeoutMillis()); 1156 assertThreadsStayAlive(timeoutMillis(), threads); 1178 assertFutureTimesOut(future, timeoutMillis()); 1184 void assertFutureTimesOut(Future future, long timeoutMillis) { 1187 future.get(timeoutMillis, MILLISECONDS); 1193 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); 1482 void waitForThreadToEnterWaitState(Thread thread, long timeoutMillis) { 1494 else if (millisElapsedSince(startTime) > timeoutMillis) { 1508 Thread thread, long timeoutMillis, Callable<Boolean> waitingForGodot) { [all …]
|
D | ReentrantLockTest.java | 181 long timeoutMillis = 2 * LONG_DELAY_MS; in await() local 187 assertTrue(c.await(timeoutMillis, MILLISECONDS)); in await() 190 long timeoutNanos = MILLISECONDS.toNanos(timeoutMillis); in await() 196 assertTrue(c.awaitUntil(delayedDate(timeoutMillis))); in await() 430 final long timeoutMillis = timeoutMillis(); in testTryLock_Timeout() local 435 assertFalse(lock.tryLock(timeoutMillis, MILLISECONDS)); in testTryLock_Timeout() 436 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in testTryLock_Timeout() 556 final long timeoutMillis = timeoutMillis(); 557 final long timeoutNanos = MILLISECONDS.toNanos(timeoutMillis); 564 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); [all …]
|
D | ReentrantReadWriteLockTest.java | 190 long timeoutMillis = 2 * LONG_DELAY_MS; in await() local 196 assertTrue(c.await(timeoutMillis, MILLISECONDS)); in await() 199 long timeoutNanos = MILLISECONDS.toNanos(timeoutMillis); in await() 205 assertTrue(c.awaitUntil(delayedDate(timeoutMillis))); in await() 819 final long timeoutMillis = timeoutMillis(); in testWriteTryLock_Timeout() local 824 assertFalse(lock.writeLock().tryLock(timeoutMillis, MILLISECONDS)); in testWriteTryLock_Timeout() 825 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in testWriteTryLock_Timeout() 843 long timeoutMillis = timeoutMillis(); in testReadTryLock_Timeout() 844 assertFalse(lock.readLock().tryLock(timeoutMillis, MILLISECONDS)); in testReadTryLock_Timeout() 845 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in testReadTryLock_Timeout() [all …]
|
D | AbstractQueuedLongSynchronizerTest.java | 245 long timeoutMillis = 2 * LONG_DELAY_MS; in await() local 251 assertTrue(c.await(timeoutMillis, MILLISECONDS)); in await() 254 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in await() 259 assertTrue(c.awaitUntil(delayedDate(timeoutMillis))); in await() 271 final long timeoutMillis = timeoutMillis(); in assertAwaitTimesOut() local 277 assertFalse(c.await(timeoutMillis, MILLISECONDS)); in assertAwaitTimesOut() 278 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in assertAwaitTimesOut() 282 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in assertAwaitTimesOut() 286 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in assertAwaitTimesOut() 291 java.util.Date delayedDate = delayedDate(timeoutMillis); in assertAwaitTimesOut() [all …]
|
D | AbstractQueuedSynchronizerTest.java | 248 long timeoutMillis = 2 * LONG_DELAY_MS; in await() local 254 assertTrue(c.await(timeoutMillis, MILLISECONDS)); in await() 257 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in await() 262 assertTrue(c.awaitUntil(delayedDate(timeoutMillis))); in await() 274 final long timeoutMillis = timeoutMillis(); in assertAwaitTimesOut() local 280 assertFalse(c.await(timeoutMillis, MILLISECONDS)); in assertAwaitTimesOut() 281 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in assertAwaitTimesOut() 285 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in assertAwaitTimesOut() 289 assertTrue(millisElapsedSince(startTime) >= timeoutMillis); in assertAwaitTimesOut() 294 java.util.Date delayedDate = delayedDate(timeoutMillis); in assertAwaitTimesOut() [all …]
|
D | ExecutorsTest.java | 235 timeoutMillis(), MILLISECONDS); in testNewSingleThreadScheduledExecutor() 242 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testNewSingleThreadScheduledExecutor() 259 timeoutMillis(), MILLISECONDS); in testNewScheduledThreadPool() 266 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testNewScheduledThreadPool() 285 timeoutMillis(), MILLISECONDS); in testUnconfigurableScheduledExecutorService() 292 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testUnconfigurableScheduledExecutorService()
|
D | ScheduledExecutorSubclassTest.java | 153 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule1() 156 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule1() 158 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule1() 173 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule3() 175 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule3() 178 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule3() 193 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule4() 196 p.scheduleAtFixedRate(task, timeoutMillis(), in testSchedule4() 199 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule4() 215 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule5() [all …]
|
D | ScheduledExecutorTest.java | 96 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule1() 99 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule1() 101 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule1() 117 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule3() 119 Future f = p.schedule(task, timeoutMillis(), MILLISECONDS); in testSchedule3() 122 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule3() 137 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule4() 140 p.scheduleAtFixedRate(task, timeoutMillis(), in testSchedule4() 143 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule4() 159 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testSchedule5() [all …]
|
D | SynchronousQueueTest.java | 220 assertFalse(q.offer(new Object(), timeoutMillis(), MILLISECONDS)); in testTimedOffer() 221 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedOffer() 264 try { assertNull(q.poll(timeoutMillis(), MILLISECONDS)); } in testTimedPoll() 266 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedPoll() 282 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPollWithOffer() 283 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedPollWithOffer()
|
D | LinkedBlockingDequeTest.java | 687 assertFalse(q.offer(new Object(), timeoutMillis(), MILLISECONDS)); in testTimedOffer() 688 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedOffer() 778 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll() 779 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedPoll() 917 assertFalse(q.offerFirst(new Object(), timeoutMillis(), MILLISECONDS)); in testTimedOfferFirst() 918 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedOfferFirst() 1079 assertNull(q.pollFirst(timeoutMillis(), MILLISECONDS)); in testTimedPollFirst() 1080 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedPollFirst() 1130 assertNull(q.pollFirst(timeoutMillis(), MILLISECONDS)); in testTimedPollFirstWithOfferFirst() 1131 assertTrue(millisElapsedSince(startTime) >= timeoutMillis()); in testTimedPollFirstWithOfferFirst() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/concurrent/ |
D | TestUtils.java | 28 public static void joinThreadOrFail(long timeoutMillis, Thread thread) { in joinThreadOrFail() argument 30 thread.join(timeoutMillis); in joinThreadOrFail()
|