/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | ScheduledThreadPoolExecutor.java | 527 private long triggerTime(long delay, TimeUnit unit) { in triggerTime() argument 528 return triggerTime(unit.toNanos((delay < 0) ? 0 : delay)); in triggerTime() 534 long triggerTime(long delay) { in triggerTime() argument 536 ((delay < (Long.MAX_VALUE >> 1)) ? delay : overflowFree(delay)); in triggerTime() 546 private long overflowFree(long delay) { in overflowFree() argument 550 if (headDelay < 0 && (delay - headDelay < 0)) in overflowFree() 551 delay = Long.MAX_VALUE + headDelay; in overflowFree() 553 return delay; in overflowFree() 561 long delay, in schedule() argument 567 triggerTime(delay, unit), in schedule() [all …]
|
D | ScheduledExecutorService.java | 107 long delay, TimeUnit unit); in schedule() argument 123 long delay, TimeUnit unit); in schedule() argument 206 long delay, in scheduleWithFixedDelay() argument
|
D | DelayQueue.java | 219 long delay = first.getDelay(NANOSECONDS); in take() local 220 if (delay <= 0L) in take() 229 available.awaitNanos(delay); in take() 267 long delay = first.getDelay(NANOSECONDS); in poll() local 268 if (delay <= 0L) in poll() 273 if (nanos < delay || leader != null) in poll() 279 long timeLeft = available.awaitNanos(delay); in poll() 280 nanos -= delay - timeLeft; in poll()
|
D | Executors.java | 769 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { 770 return e.schedule(command, delay, unit); 772 public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) { 773 return e.schedule(callable, delay, unit); 778 …dFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) { 779 return e.scheduleWithFixedDelay(command, initialDelay, delay, unit);
|
D | CompletableFuture.java | 2695 whenComplete(new Canceller(Delayer.delay(new Timeout(this), in orTimeout() 2717 whenComplete(new Canceller(Delayer.delay( in completeOnTimeout() 2736 public static Executor delayedExecutor(long delay, TimeUnit unit, in delayedExecutor() argument 2740 return new DelayedExecutor(delay, unit, executor); in delayedExecutor() 2755 public static Executor delayedExecutor(long delay, TimeUnit unit) { in delayedExecutor() argument 2758 return new DelayedExecutor(delay, unit, ASYNC_POOL); in delayedExecutor() 2809 static ScheduledFuture<?> delay(Runnable command, long delay, in delay() argument 2811 return delayer.schedule(command, delay, unit); in delay() 2834 final long delay; field in CompletableFuture.DelayedExecutor 2837 DelayedExecutor(long delay, TimeUnit unit, Executor executor) { in DelayedExecutor() argument [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Timer.java | 209 public void schedule(TimerTask task, long delay) { in schedule() argument 210 if (delay < 0) in schedule() 212 sched(task, System.currentTimeMillis()+delay, 0); in schedule() 262 public void schedule(TimerTask task, long delay, long period) { in schedule() argument 263 if (delay < 0) in schedule() 267 sched(task, System.currentTimeMillis()+delay, -period); in schedule() 342 public void scheduleAtFixedRate(TimerTask task, long delay, long period) { in scheduleAtFixedRate() argument 343 if (delay < 0) in scheduleAtFixedRate() 347 sched(task, System.currentTimeMillis()+delay, period); in scheduleAtFixedRate()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | JSR166TestCase.java | 838 static void delay(long millis) throws InterruptedException { in delay() method in JSR166TestCase 993 delay(millis); 1014 delay(millis); 1199 delay(millis); 1559 delay(SHORT_DELAY_MS); 1565 delay(SHORT_DELAY_MS); 1571 delay(SMALL_DELAY_MS); 1578 delay(SMALL_DELAY_MS); 1585 delay(SMALL_DELAY_MS); 1592 delay(MEDIUM_DELAY_MS); [all …]
|
D | ScheduledExecutorSubclassTest.java | 217 for (int delay = 1; delay <= LONG_DELAY_MS; delay *= 3) { in testFixedRateSequence() 224 p.scheduleAtFixedRate(task, 0, delay, MILLISECONDS); in testFixedRateSequence() 225 final int totalDelayMillis = (cycles - 1) * delay; in testFixedRateSequence() 230 if (elapsedMillis <= cycles * delay) in testFixedRateSequence() 246 for (int delay = 1; delay <= LONG_DELAY_MS; delay *= 3) { in testFixedDelaySequence() 252 final int d = delay; in testFixedDelaySequence() 270 p.scheduleWithFixedDelay(task, 0, delay, MILLISECONDS); in testFixedDelaySequence() 271 final int totalDelayMillis = (cycles - 1) * delay; in testFixedDelaySequence()
|
D | ScheduledExecutorTest.java | 161 for (int delay = 1; delay <= LONG_DELAY_MS; delay *= 3) { in testFixedRateSequence() 168 p.scheduleAtFixedRate(task, 0, delay, MILLISECONDS); in testFixedRateSequence() 169 final int totalDelayMillis = (cycles - 1) * delay; in testFixedRateSequence() 174 if (elapsedMillis <= cycles * delay) in testFixedRateSequence() 190 for (int delay = 1; delay <= LONG_DELAY_MS; delay *= 3) { in testFixedDelaySequence() 196 final int d = delay; in testFixedDelaySequence() 214 p.scheduleWithFixedDelay(task, 0, delay, MILLISECONDS); in testFixedDelaySequence() 215 final int totalDelayMillis = (cycles - 1) * delay; in testFixedDelaySequence()
|
D | FutureTaskTest.java | 422 delay(LONG_DELAY_MS); in testCancelInterrupt() 496 delay(LONG_DELAY_MS); in testCancelInterrupt_taskFails() 639 delay(2*LONG_DELAY_MS); in testTimedGet_Cancellation()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | ObjectTest.java | 324 final int delay = 200; // milliseconds in test_waitJ() local 331 lock.wait(delay, 0); in test_waitJ() 333 long error = (after - before - delay); in test_waitJ() 344 if (error > (1000 + delay) || count == toLong.length) { in test_waitJ()
|
D | ThreadTest.java | 26 int delay; field in ThreadTest.SimpleThread 32 this.wait(delay); in run() 42 delay = d; in SimpleThread() 47 volatile int delay; field in ThreadTest.YieldThread 58 delay = d; in YieldThread()
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | JSR166TestCase.java | 969 static void delay(long millis) throws InterruptedException { in delay() method in JSR166TestCase 1144 delay(millis); 1165 delay(millis); 1469 delay(millis); 1831 delay(SHORT_DELAY_MS); 1837 delay(SHORT_DELAY_MS); 1843 delay(SMALL_DELAY_MS); 1850 delay(SMALL_DELAY_MS); 1857 delay(SMALL_DELAY_MS); 1864 delay(MEDIUM_DELAY_MS); [all …]
|
D | SubmissionPublisherTest.java | 889 long delay = timeoutMillis(); 891 assertTrue(p.offer(i, delay, MILLISECONDS, null) >= 0); 893 assertTrue(p.offer(5, delay, MILLISECONDS, null) < 0); 895 assertTrue(p.offer(6, delay, MILLISECONDS, null) < 0); 897 assertTrue(millisElapsedSince(startTime) >= delay); 921 long delay = timeoutMillis(); in testHandledDroppedTimedOffer() local 923 assertTrue(p.offer(i, delay, MILLISECONDS, (s, x) -> noopHandle(calls)) >= 0); in testHandledDroppedTimedOffer() 925 assertTrue(p.offer(5, delay, MILLISECONDS, (s, x) -> noopHandle(calls)) < 0); in testHandledDroppedTimedOffer() 927 assertTrue(p.offer(6, delay, MILLISECONDS, (s, x) -> noopHandle(calls)) < 0); in testHandledDroppedTimedOffer() 928 assertTrue(millisElapsedSince(startTime) >= delay); in testHandledDroppedTimedOffer() [all …]
|
D | ScheduledExecutorSubclassTest.java | 241 for (int delay = 1; delay <= LONG_DELAY_MS; delay *= 3) { in testFixedRateSequence() 248 p.scheduleAtFixedRate(task, 0, delay, MILLISECONDS); in testFixedRateSequence() 249 final int totalDelayMillis = (cycles - 1) * delay; in testFixedRateSequence() 254 if (elapsedMillis <= cycles * delay) in testFixedRateSequence() 270 for (int delay = 1; delay <= LONG_DELAY_MS; delay *= 3) { in testFixedDelaySequence() 276 final int d = delay; in testFixedDelaySequence() 294 p.scheduleWithFixedDelay(task, 0, delay, MILLISECONDS); in testFixedDelaySequence() 295 final int totalDelayMillis = (cycles - 1) * delay; in testFixedDelaySequence()
|
D | ScheduledExecutorTest.java | 185 for (int delay = 1; delay <= LONG_DELAY_MS; delay *= 3) { in testFixedRateSequence() 192 p.scheduleAtFixedRate(task, 0, delay, MILLISECONDS); in testFixedRateSequence() 193 final int totalDelayMillis = (cycles - 1) * delay; in testFixedRateSequence() 198 if (elapsedMillis <= cycles * delay) in testFixedRateSequence() 214 for (int delay = 1; delay <= LONG_DELAY_MS; delay *= 3) { in testFixedDelaySequence() 220 final int d = delay; in testFixedDelaySequence() 238 p.scheduleWithFixedDelay(task, 0, delay, MILLISECONDS); in testFixedDelaySequence() 239 final int totalDelayMillis = (cycles - 1) * delay; in testFixedDelaySequence()
|
D | FutureTaskTest.java | 445 delay(LONG_DELAY_MS); in testCancelInterrupt() 519 delay(LONG_DELAY_MS); in testCancelInterrupt_taskFails() 662 delay(2*LONG_DELAY_MS); in testTimedGet_Cancellation()
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | FileIOInterruptTest.java | 481 delay(100); in waitForThreadToBlock() 485 delay(100); in waitForThreadToBlock() 520 delay(500); in waitForThreadToBlock() 569 delay(100); in waitForThreadToBlock() 573 delay(100); in waitForThreadToBlock() 621 delay(500); in waitForThreadToBlock() 708 private static void delay(int millis) { in delay() method in FileIOInterruptTest
|
/libcore/support/src/test/java/tests/support/ |
D | Support_TestWebServer.java | 184 public void setDelay(int delay) { in setDelay() argument 185 mDelay = delay; in setDelay() 319 private int delay = 0; field in Support_TestWebServer.Worker 330 Worker setDelay(int delay) { in setDelay() argument 331 this.delay = delay; in setDelay()
|
/libcore/ojluni/src/test/java/nio/channels/Selector/ |
D | SelectWithConsumer.java | 728 void scheduleWakeup(Selector sel, long delay, TimeUnit unit) { in scheduleWakeup() argument 729 POOL.schedule(() -> sel.wakeup(), delay, unit); in scheduleWakeup() local 732 void scheduleInterrupt(Thread t, long delay, TimeUnit unit) { in scheduleInterrupt() argument 733 POOL.schedule(() -> t.interrupt(), delay, unit); in scheduleInterrupt() local 736 void scheduleClose(Closeable c, long delay, TimeUnit unit) { in scheduleClose() argument 743 }, delay, unit); in scheduleClose() 746 void scheduleWrite(WritableByteChannel sink, ByteBuffer buf, long delay, TimeUnit unit) { in scheduleWrite() argument 753 }, delay, unit); in scheduleWrite()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | OldThreadTest.java | 29 int delay; field in OldThreadTest.SimpleThread 35 this.wait(delay); in run() 45 delay = d; in SimpleThread()
|
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/ |
D | Executors.java | 277 java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit) { in schedule() argument 283 long delay, in schedule() argument 299 long delay, in scheduleWithFixedDelay() argument
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Thread.java | 1527 long delay = millis - now; in join() local 1528 if (delay <= 0) { in join() 1531 lock.wait(delay); in join()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | ServerSocketTest.java | 248 int delay = (int) (finish.getTime() - start.getTime()); in test_accept() local 249 assertTrue("timeout too soon: " + delay + " " + start.getTime() in test_accept() 250 + " " + finish.getTime(), delay >= 490); in test_accept()
|
/libcore/ojluni/annotations/mmodule/java/util/concurrent/ |
D | CompletableFuture.annotated.java | 180 public static java.util.concurrent.Executor delayedExecutor(long delay, java.util.concurrent.TimeUn… in delayedExecutor() argument 182 public static java.util.concurrent.Executor delayedExecutor(long delay, java.util.concurrent.TimeUn… in delayedExecutor() argument
|