Home
last modified time | relevance | path

Searched refs:delay (Results 1 – 25 of 32) sorted by relevance

12

/libcore/ojluni/src/main/java/java/util/concurrent/
DScheduledThreadPoolExecutor.java520 private long triggerTime(long delay, TimeUnit unit) { in triggerTime() argument
521 return triggerTime(unit.toNanos((delay < 0) ? 0 : delay)); in triggerTime()
527 long triggerTime(long delay) { in triggerTime() argument
529 ((delay < (Long.MAX_VALUE >> 1)) ? delay : overflowFree(delay)); in triggerTime()
539 private long overflowFree(long delay) { in overflowFree() argument
543 if (headDelay < 0 && (delay - headDelay < 0)) in overflowFree()
544 delay = Long.MAX_VALUE + headDelay; in overflowFree()
546 return delay; in overflowFree()
554 long delay, in schedule() argument
560 triggerTime(delay, unit), in schedule()
[all …]
DScheduledExecutorService.java111 long delay, TimeUnit unit); in schedule() argument
127 long delay, TimeUnit unit); in schedule() argument
210 long delay, in scheduleWithFixedDelay() argument
DDelayQueue.java218 long delay = first.getDelay(NANOSECONDS); in take() local
219 if (delay <= 0L) in take()
228 available.awaitNanos(delay); in take()
266 long delay = first.getDelay(NANOSECONDS); in poll() local
267 if (delay <= 0L) in poll()
272 if (nanos < delay || leader != null) in poll()
278 long timeLeft = available.awaitNanos(delay); in poll()
279 nanos -= delay - timeLeft; in poll()
DExecutors.java690 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
691 return e.schedule(command, delay, unit);
693 public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) {
694 return e.schedule(callable, delay, unit);
699 …dFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) {
700 return e.scheduleWithFixedDelay(command, initialDelay, delay, unit);
DCompletableFuture.java2514 whenComplete(new Canceller(Delayer.delay(new Timeout(this), in orTimeout()
2536 whenComplete(new Canceller(Delayer.delay( in completeOnTimeout()
2555 public static Executor delayedExecutor(long delay, TimeUnit unit, in delayedExecutor() argument
2559 return new DelayedExecutor(delay, unit, executor); in delayedExecutor()
2574 public static Executor delayedExecutor(long delay, TimeUnit unit) { in delayedExecutor() argument
2577 return new DelayedExecutor(delay, unit, ASYNC_POOL); in delayedExecutor()
2628 static ScheduledFuture<?> delay(Runnable command, long delay, in delay() method in CompletableFuture.Delayer
2630 return delayer.schedule(command, delay, unit); in delay()
2653 final long delay; field in CompletableFuture.DelayedExecutor
2656 DelayedExecutor(long delay, TimeUnit unit, Executor executor) { in DelayedExecutor() argument
[all …]
/libcore/ojluni/src/main/java/java/util/
DTimer.java197 public void schedule(TimerTask task, long delay) { in schedule() argument
198 if (delay < 0) in schedule()
200 sched(task, System.currentTimeMillis()+delay, 0); in schedule()
250 public void schedule(TimerTask task, long delay, long period) { in schedule() argument
251 if (delay < 0) in schedule()
255 sched(task, System.currentTimeMillis()+delay, -period); in schedule()
330 public void scheduleAtFixedRate(TimerTask task, long delay, long period) { in scheduleAtFixedRate() argument
331 if (delay < 0) in scheduleAtFixedRate()
335 sched(task, System.currentTimeMillis()+delay, period); in scheduleAtFixedRate()
/libcore/jsr166-tests/src/test/java/jsr166/
DJSR166TestCase.java838 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 …]
DScheduledExecutorSubclassTest.java217 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()
DScheduledExecutorTest.java161 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()
DFutureTaskTest.java422 delay(LONG_DELAY_MS); in testCancelInterrupt()
496 delay(LONG_DELAY_MS); in testCancelInterrupt_taskFails()
639 delay(2*LONG_DELAY_MS); in testTimedGet_Cancellation()
DCyclicBarrierTest.java322 delay(timeoutMillis()); in testReset_Leakage()
/libcore/ojluni/src/test/java/util/concurrent/tck/
DJSR166TestCase.java929 static void delay(long millis) throws InterruptedException { in delay() method in JSR166TestCase
1104 delay(millis);
1125 delay(millis);
1306 delay(millis);
1668 delay(SHORT_DELAY_MS);
1674 delay(SHORT_DELAY_MS);
1680 delay(SMALL_DELAY_MS);
1687 delay(SMALL_DELAY_MS);
1694 delay(SMALL_DELAY_MS);
1701 delay(MEDIUM_DELAY_MS);
[all …]
DScheduledExecutorSubclassTest.java239 for (int delay = 1; delay <= LONG_DELAY_MS; delay *= 3) { in testFixedRateSequence()
246 p.scheduleAtFixedRate(task, 0, delay, MILLISECONDS); in testFixedRateSequence()
247 final int totalDelayMillis = (cycles - 1) * delay; in testFixedRateSequence()
252 if (elapsedMillis <= cycles * delay) in testFixedRateSequence()
268 for (int delay = 1; delay <= LONG_DELAY_MS; delay *= 3) { in testFixedDelaySequence()
274 final int d = delay; in testFixedDelaySequence()
292 p.scheduleWithFixedDelay(task, 0, delay, MILLISECONDS); in testFixedDelaySequence()
293 final int totalDelayMillis = (cycles - 1) * delay; in testFixedDelaySequence()
DScheduledExecutorTest.java183 for (int delay = 1; delay <= LONG_DELAY_MS; delay *= 3) { in testFixedRateSequence()
190 p.scheduleAtFixedRate(task, 0, delay, MILLISECONDS); in testFixedRateSequence()
191 final int totalDelayMillis = (cycles - 1) * delay; in testFixedRateSequence()
196 if (elapsedMillis <= cycles * delay) in testFixedRateSequence()
212 for (int delay = 1; delay <= LONG_DELAY_MS; delay *= 3) { in testFixedDelaySequence()
218 final int d = delay; in testFixedDelaySequence()
236 p.scheduleWithFixedDelay(task, 0, delay, MILLISECONDS); in testFixedDelaySequence()
237 final int totalDelayMillis = (cycles - 1) * delay; in testFixedDelaySequence()
DFutureTaskTest.java445 delay(LONG_DELAY_MS); in testCancelInterrupt()
519 delay(LONG_DELAY_MS); in testCancelInterrupt_taskFails()
662 delay(2*LONG_DELAY_MS); in testTimedGet_Cancellation()
DCyclicBarrierTest.java343 delay(timeoutMillis()); in testReset_Leakage()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DObjectTest.java324 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()
DThreadTest.java26 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/luni/src/test/java/libcore/java/nio/channels/
DFileIOInterruptTest.java481 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/
DSupport_TestWebServer.java184 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/luni/src/test/java/libcore/java/lang/
DOldThreadTest.java29 int delay; field in OldThreadTest.SimpleThread
35 this.wait(delay); in run()
45 delay = d; in SimpleThread()
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/
DExecutors.java277 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/
DThread.java1430 long delay = millis - now; in join() local
1431 if (delay <= 0) { in join()
1434 lock.wait(delay); in join()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DServerSocketTest.java248 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/
DCompletableFuture.annotated.java180 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

12