/libcore/luni/src/main/java/java/util/ |
D | Timer.java | 435 long delay = when.getTime() - System.currentTimeMillis(); in schedule() local 436 scheduleImpl(task, delay < 0 ? 0 : delay, -1, false); in schedule() 452 public void schedule(TimerTask task, long delay) { in schedule() argument 453 if (delay < 0) { in schedule() 454 throw new IllegalArgumentException("delay < 0: " + delay); in schedule() 456 scheduleImpl(task, delay, -1, false); in schedule() 474 public void schedule(TimerTask task, long delay, long period) { in schedule() argument 475 if (delay < 0 || period <= 0) { in schedule() 478 scheduleImpl(task, delay, period, false); in schedule() 501 long delay = when.getTime() - System.currentTimeMillis(); in schedule() local [all …]
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | ScheduledThreadPoolExecutor.java | 462 private long triggerTime(long delay, TimeUnit unit) { in triggerTime() argument 463 return triggerTime(unit.toNanos((delay < 0) ? 0 : delay)); in triggerTime() 469 long triggerTime(long delay) { in triggerTime() argument 471 ((delay < (Long.MAX_VALUE >> 1)) ? delay : overflowFree(delay)); in triggerTime() 481 private long overflowFree(long delay) { in overflowFree() argument 485 if (headDelay < 0 && (delay - headDelay < 0)) in overflowFree() 486 delay = Long.MAX_VALUE + headDelay; in overflowFree() 488 return delay; in overflowFree() 496 long delay, in schedule() argument 502 triggerTime(delay, unit))); in schedule() [all …]
|
D | ScheduledExecutorService.java | 82 long delay, TimeUnit unit); in schedule() argument 97 long delay, TimeUnit unit); in schedule() argument 153 long delay, in scheduleWithFixedDelay() argument
|
D | DelayQueue.java | 184 long delay = first.getDelay(NANOSECONDS); in take() local 185 if (delay <= 0) in take() 194 available.awaitNanos(delay); in take() 232 long delay = first.getDelay(NANOSECONDS); in poll() local 233 if (delay <= 0) in poll() 238 if (nanos < delay || leader != null) in poll() 244 long timeLeft = available.awaitNanos(delay); in poll() 245 nanos -= delay - timeLeft; in poll()
|
D | Executors.java | 643 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { 644 return e.schedule(command, delay, unit); 646 public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) { 647 return e.schedule(callable, delay, unit); 652 …dFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) { 653 return e.scheduleWithFixedDelay(command, initialDelay, delay, unit);
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | JSR166TestCase.java | 366 static void delay(long millis) throws InterruptedException { in delay() method in JSR166TestCase 411 delay(millis); in assertThreadStaysAlive() 432 delay(millis); in assertThreadsStayAlive() 584 delay(millis); in sleep() 845 delay(SHORT_DELAY_MS); 851 delay(SHORT_DELAY_MS); 857 delay(SMALL_DELAY_MS); 864 delay(SMALL_DELAY_MS); 871 delay(SMALL_DELAY_MS); 878 delay(MEDIUM_DELAY_MS); [all …]
|
D | FutureTaskTest.java | 404 delay(LONG_DELAY_MS); in testCancelInterrupt() 478 delay(LONG_DELAY_MS); in testCancelInterrupt_taskFails() 621 delay(2*LONG_DELAY_MS); in testTimedGet_Cancellation()
|
D | CyclicBarrierTest.java | 311 delay(timeoutMillis()); in testReset_Leakage()
|
D | ExecutorsTest.java | 263 delay(LONG_DELAY_MS); in testTimedCallable()
|
D | ScheduledExecutorTest.java | 143 delay(SMALL_DELAY_MS); in testFixedRateSequence() 161 delay(SMALL_DELAY_MS); in testFixedDelaySequence()
|
D | SynchronousQueueTest.java | 578 delay(SHORT_DELAY_MS);
|
D | ScheduledExecutorSubclassTest.java | 195 delay(SMALL_DELAY_MS); in testFixedRateSequence() 213 delay(SMALL_DELAY_MS); in testFixedDelaySequence()
|
D | ThreadPoolExecutorTest.java | 1943 delay(coreThreadTimeOut); in testAllowCoreThreadTimeOut_true() 1972 delay(2 * coreThreadTimeOut);
|
D | ThreadPoolExecutorSubclassTest.java | 1733 delay(coreThreadTimeOut); in testAllowCoreThreadTimeOut_true() 1762 delay(2 * coreThreadTimeOut);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | ObjectTest.java | 293 final int delay = 200; // milliseconds in test_waitJ() local 300 obj1.wait(delay, 0); in test_waitJ() 302 long error = (after - before - delay); in test_waitJ() 313 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/luni/src/test/java/libcore/java/net/ |
D | OldAndroidDatagramTest.java | 179 long delay = System.currentTimeMillis() - start; in testDatagramSocketSetSOTimeout() 180 if (Math.abs(delay - timeout) > 1000) { in testDatagramSocketSetSOTimeout() 182 + " actual: " + delay + " miliseconds."); in testDatagramSocketSetSOTimeout()
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | FileIOInterruptTest.java | 473 delay(100); in waitForThreadToBlock() 477 delay(100); in waitForThreadToBlock() 512 delay(500); in waitForThreadToBlock() 561 delay(100); in waitForThreadToBlock() 565 delay(100); in waitForThreadToBlock() 613 delay(500); in waitForThreadToBlock() 700 private static void delay(int millis) { in delay() method in FileIOInterruptTest
|
/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/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | ServerSocketTest.java | 233 int delay = (int) (finish.getTime() - start.getTime()); in test_accept() local 234 assertTrue("timeout too soon: " + delay + " " + start.getTime() in test_accept() 235 + " " + finish.getTime(), delay >= 490); in test_accept()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | R.java | 1514 public static final int delay = 0; field in R
|