Home
last modified time | relevance | path

Searched refs:TimeUnit (Results 1 – 25 of 78) sorted by relevance

1234

/libcore/jsr166-tests/src/test/java/jsr166/
DTimeUnitTest.java13 import java.util.concurrent.TimeUnit;
25 TimeUnit.SECONDS.convert(t, in testConvert()
26 TimeUnit.DAYS)); in testConvert()
28 TimeUnit.SECONDS.convert(t, in testConvert()
29 TimeUnit.HOURS)); in testConvert()
31 TimeUnit.SECONDS.convert(t, in testConvert()
32 TimeUnit.MINUTES)); in testConvert()
34 TimeUnit.SECONDS.convert(t, in testConvert()
35 TimeUnit.SECONDS)); in testConvert()
37 TimeUnit.SECONDS.convert(1000L*t, in testConvert()
[all …]
DExecutorCompletionServiceTest.java22 import java.util.concurrent.TimeUnit;
23 import static java.util.concurrent.TimeUnit.MILLISECONDS;
168 1, 1, 30L, TimeUnit.SECONDS, in testNewTaskForCallable()
200 1, 1, 30L, TimeUnit.SECONDS, in testNewTaskForRunnable()
/libcore/luni/src/main/java/java/util/concurrent/
DScheduledExecutorService.java82 long delay, TimeUnit unit); in schedule()
97 long delay, TimeUnit unit); in schedule()
127 TimeUnit unit); in scheduleAtFixedRate()
154 TimeUnit unit); in scheduleWithFixedDelay()
DBlockingDeque.java288 boolean offerFirst(E e, long timeout, TimeUnit unit) in offerFirst()
310 boolean offerLast(E e, long timeout, TimeUnit unit) in offerLast()
344 E pollFirst(long timeout, TimeUnit unit) in pollFirst()
360 E pollLast(long timeout, TimeUnit unit) in pollLast()
477 boolean offer(E e, long timeout, TimeUnit unit) in offer()
528 E poll(long timeout, TimeUnit unit) in poll()
DExecutors.java62 0L, TimeUnit.MILLISECONDS, in newFixedThreadPool()
125 0L, TimeUnit.MILLISECONDS, in newFixedThreadPool()
146 0L, TimeUnit.MILLISECONDS, in newSingleThreadExecutor()
167 0L, TimeUnit.MILLISECONDS, in newSingleThreadExecutor()
190 60L, TimeUnit.SECONDS, in newCachedThreadPool()
205 60L, TimeUnit.SECONDS, in newCachedThreadPool()
588 public boolean awaitTermination(long timeout, TimeUnit unit)
606 long timeout, TimeUnit unit)
615 long timeout, TimeUnit unit)
643 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
[all …]
DExecutorService.java170 boolean awaitTermination(long timeout, TimeUnit unit) in awaitTermination()
275 long timeout, TimeUnit unit) in invokeAll()
322 long timeout, TimeUnit unit) in invokeAny()
DTimeUnit.java42 public enum TimeUnit { enum
51 public long convert(long d, TimeUnit u) { return u.toNanos(d); } in convert()
62 public long convert(long d, TimeUnit u) { return u.toMicros(d); } in convert()
73 public long convert(long d, TimeUnit u) { return u.toMillis(d); } in convert()
84 public long convert(long d, TimeUnit u) { return u.toSeconds(d); } in convert()
95 public long convert(long d, TimeUnit u) { return u.toMinutes(d); } in convert()
106 public long convert(long d, TimeUnit u) { return u.toHours(d); } in convert()
117 public long convert(long d, TimeUnit u) { return u.toDays(d); } in convert()
166 public long convert(long sourceDuration, TimeUnit sourceUnit) { in convert()
DBlockingQueue.java223 boolean offer(E e, long timeout, TimeUnit unit) in offer()
247 E poll(long timeout, TimeUnit unit) in poll()
DDelayed.java30 long getDelay(TimeUnit unit); in getDelay()
DFuture.java138 V get(long timeout, TimeUnit unit) in get()
DTransferQueue.java105 boolean tryTransfer(E e, long timeout, TimeUnit unit) in tryTransfer()
DAbstractExecutorService.java151 f = ecs.poll(nanos, TimeUnit.NANOSECONDS); in doInvokeAny()
192 long timeout, TimeUnit unit) in invokeAny()
229 long timeout, TimeUnit unit) in invokeAll()
258 f.get(nanos, TimeUnit.NANOSECONDS); in invokeAll()
DScheduledThreadPoolExecutor.java8 import static java.util.concurrent.TimeUnit.NANOSECONDS;
207 public long getDelay(TimeUnit unit) { in getDelay()
462 private long triggerTime(long delay, TimeUnit unit) { in triggerTime()
497 TimeUnit unit) { in schedule()
513 TimeUnit unit) { in schedule()
531 TimeUnit unit) { in scheduleAtFixedRate()
555 TimeUnit unit) { in scheduleWithFixedDelay()
1007 public boolean offer(Runnable e, long timeout, TimeUnit unit) { in offer()
1075 public RunnableScheduledFuture<?> poll(long timeout, TimeUnit unit) in poll()
DCompletionService.java94 Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException; in poll()
DThreadPoolExecutor.java1036 workQueue.poll(keepAliveTime, TimeUnit.NANOSECONDS) : in getTask()
1163 TimeUnit unit, in ThreadPoolExecutor()
1197 TimeUnit unit, in ThreadPoolExecutor()
1232 TimeUnit unit, in ThreadPoolExecutor()
1269 TimeUnit unit, in ThreadPoolExecutor()
1420 public boolean awaitTermination(long timeout, TimeUnit unit) in awaitTermination()
1660 public void setKeepAliveTime(long time, TimeUnit unit) { in setKeepAliveTime()
1681 public long getKeepAliveTime(TimeUnit unit) { in getKeepAliveTime()
1682 return unit.convert(keepAliveTime, TimeUnit.NANOSECONDS); in getKeepAliveTime()
DSemaphore.java378 public boolean tryAcquire(long timeout, TimeUnit unit) in tryAcquire()
550 public boolean tryAcquire(int permits, long timeout, TimeUnit unit) in tryAcquire()
DCountDownLatch.java246 public boolean await(long timeout, TimeUnit unit) in await()
DDelayQueue.java8 import static java.util.concurrent.TimeUnit.NANOSECONDS;
143 public boolean offer(E e, long timeout, TimeUnit unit) { in offer()
219 public E poll(long timeout, TimeUnit unit) throws InterruptedException { in poll()
/libcore/luni/src/test/java/libcore/java/lang/ref/
DReferenceQueueTest.java22 import java.util.concurrent.TimeUnit;
56 long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos); in testRemoveWithSpuriousNotify()
78 long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos); in testRemoveWithDelayedResultAndNoTimeout()
88 long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos); in testRemoveWithDelayedResultAndTimeout()
94 executor.schedule(runnable, delayMillis, TimeUnit.MILLISECONDS); in runLater()
/libcore/luni/src/main/java/java/util/concurrent/locks/
DLock.java8 import java.util.concurrent.TimeUnit;
292 boolean tryLock(long time, TimeUnit unit) throws InterruptedException; in tryLock()
DCondition.java8 import java.util.concurrent.TimeUnit;
344 boolean await(long time, TimeUnit unit) throws InterruptedException; in await()
DReentrantLock.java8 import java.util.concurrent.TimeUnit;
411 public boolean tryLock(long timeout, TimeUnit unit) in tryLock()
/libcore/support/src/test/java/tests/support/
DSupport_Exec.java34 import java.util.concurrent.TimeUnit;
95 out = outFuture.get(30, TimeUnit.SECONDS); in execAndGetOutput()
96 String err = errFuture.get(30, TimeUnit.SECONDS); in execAndGetOutput()
131 assertEquals(expectedOut, outFuture.get(10, TimeUnit.SECONDS)); in execAndCheckOutput()
132 assertEquals(expectedErr, errFuture.get(10, TimeUnit.SECONDS)); in execAndCheckOutput()
/libcore/support/src/test/java/libcore/javax/net/ssl/
DTestSSLSocketPair.java24 import java.util.concurrent.TimeUnit;
104 s.get(30, TimeUnit.SECONDS); in connect()
112 c.get(30, TimeUnit.SECONDS); in connect()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/apache/harmony/kernel/dalvik/
DThreadsTest.java21 import java.util.concurrent.TimeUnit;
178 barrier.await(60, TimeUnit.SECONDS); in run()
272 barrier.await(60, TimeUnit.SECONDS); in run()

1234