Home
last modified time | relevance | path

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

1234

/libcore/luni/src/main/java/java/util/concurrent/
DScheduledExecutorService.java82 long delay, TimeUnit unit); in schedule()
98 long delay, TimeUnit unit); in schedule()
142 TimeUnit unit); in scheduleAtFixedRate()
182 TimeUnit unit); in scheduleWithFixedDelay()
DBlockingDeque.java295 boolean offerFirst(E e, long timeout, TimeUnit unit) in offerFirst()
317 boolean offerLast(E e, long timeout, TimeUnit unit) in offerLast()
351 E pollFirst(long timeout, TimeUnit unit) in pollFirst()
367 E pollLast(long timeout, TimeUnit unit) in pollLast()
484 boolean offer(E e, long timeout, TimeUnit unit) in offer()
535 E poll(long timeout, TimeUnit unit) in poll()
DExecutors.java67 0L, TimeUnit.MILLISECONDS, in newFixedThreadPool()
130 0L, TimeUnit.MILLISECONDS, in newFixedThreadPool()
151 0L, TimeUnit.MILLISECONDS, in newSingleThreadExecutor()
172 0L, TimeUnit.MILLISECONDS, in newSingleThreadExecutor()
195 60L, TimeUnit.SECONDS, in newCachedThreadPool()
210 60L, TimeUnit.SECONDS, in newCachedThreadPool()
596 public boolean awaitTermination(long timeout, TimeUnit unit)
614 long timeout, TimeUnit unit)
623 long timeout, TimeUnit unit)
651 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
[all …]
DExecutorService.java171 boolean awaitTermination(long timeout, TimeUnit unit) in awaitTermination()
280 long timeout, TimeUnit unit) in invokeAll()
329 long timeout, TimeUnit unit) in invokeAny()
DTimeUnit.java48 public enum TimeUnit { enum
60 public long convert(long d, TimeUnit u) { return u.toNanos(d); } in convert()
75 public long convert(long d, TimeUnit u) { return u.toMicros(d); } in convert()
90 public long convert(long d, TimeUnit u) { return u.toMillis(d); } in convert()
105 public long convert(long d, TimeUnit u) { return u.toSeconds(d); } in convert()
121 public long convert(long d, TimeUnit u) { return u.toMinutes(d); } in convert()
137 public long convert(long d, TimeUnit u) { return u.toHours(d); } in convert()
153 public long convert(long d, TimeUnit u) { return u.toDays(d); } in convert()
201 public long convert(long sourceDuration, TimeUnit sourceUnit) { in convert()
DBlockingQueue.java224 boolean offer(E e, long timeout, TimeUnit unit) in offer()
248 E poll(long timeout, TimeUnit unit) in poll()
DDelayed.java30 long getDelay(TimeUnit unit); in getDelay()
DScheduledThreadPoolExecutor.java9 import static java.util.concurrent.TimeUnit.MILLISECONDS;
10 import static java.util.concurrent.TimeUnit.NANOSECONDS;
211 public long getDelay(TimeUnit unit) { in getDelay()
491 private long triggerTime(long delay, TimeUnit unit) { in triggerTime()
526 TimeUnit unit) { in schedule()
543 TimeUnit unit) { in schedule()
562 TimeUnit unit) { in scheduleAtFixedRate()
587 TimeUnit unit) { in scheduleWithFixedDelay()
1051 public boolean offer(Runnable e, long timeout, TimeUnit unit) { in offer()
1118 public RunnableScheduledFuture<?> poll(long timeout, TimeUnit unit) in poll()
DFuture.java139 V get(long timeout, TimeUnit unit) in get()
DTransferQueue.java105 boolean tryTransfer(E e, long timeout, TimeUnit unit) in tryTransfer()
DCompletionService.java94 Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException; in poll()
DThreadPoolExecutor.java1057 workQueue.poll(keepAliveTime, TimeUnit.NANOSECONDS) : in getTask()
1184 TimeUnit unit, in ThreadPoolExecutor()
1218 TimeUnit unit, in ThreadPoolExecutor()
1253 TimeUnit unit, in ThreadPoolExecutor()
1290 TimeUnit unit, in ThreadPoolExecutor()
1443 public boolean awaitTermination(long timeout, TimeUnit unit) in awaitTermination()
1691 public void setKeepAliveTime(long time, TimeUnit unit) { in setKeepAliveTime()
1715 public long getKeepAliveTime(TimeUnit unit) { in getKeepAliveTime()
1716 return unit.convert(keepAliveTime, TimeUnit.NANOSECONDS); in getKeepAliveTime()
DSemaphore.java384 public boolean tryAcquire(long timeout, TimeUnit unit) in tryAcquire()
560 public boolean tryAcquire(int permits, long timeout, TimeUnit unit) in tryAcquire()
/libcore/luni/src/test/java/libcore/java/lang/ref/
DReferenceQueueTest.java23 import java.util.concurrent.TimeUnit;
59 long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos); in testRemoveWithSpuriousNotify()
81 long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos); in testRemoveWithDelayedResultAndNoTimeout()
91 long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos); in testRemoveWithDelayedResultAndTimeout()
111 countedDown = cdl.await(1000, TimeUnit.MILLISECONDS); in testCleanersCleaned()
125 executor.schedule(runnable, delayMillis, TimeUnit.MILLISECONDS); in runLater()
/libcore/jsr166-tests/src/test/java/jsr166/
DTimeUnitTest.java11 import static java.util.concurrent.TimeUnit.DAYS;
12 import static java.util.concurrent.TimeUnit.HOURS;
13 import static java.util.concurrent.TimeUnit.MICROSECONDS;
14 import static java.util.concurrent.TimeUnit.MILLISECONDS;
15 import static java.util.concurrent.TimeUnit.MINUTES;
16 import static java.util.concurrent.TimeUnit.NANOSECONDS;
17 import static java.util.concurrent.TimeUnit.SECONDS;
20 import java.util.concurrent.TimeUnit;
322 TimeUnit tu = MILLISECONDS; in testTimedWait_IllegalMonitorException()
341 TimeUnit tu = MILLISECONDS; in testTimedWait_Interruptible()
[all …]
DExecutorCompletionServiceTest.java11 import static java.util.concurrent.TimeUnit.MILLISECONDS;
22 import java.util.concurrent.TimeUnit;
169 30L, TimeUnit.SECONDS, in testNewTaskForCallable()
200 30L, TimeUnit.SECONDS, in testNewTaskForRunnable()
/libcore/luni/src/main/java/java/util/concurrent/locks/
DLock.java9 import java.util.concurrent.TimeUnit;
294 boolean tryLock(long time, TimeUnit unit) throws InterruptedException; in tryLock()
DCondition.java10 import java.util.concurrent.TimeUnit;
345 boolean await(long time, TimeUnit unit) throws InterruptedException; in await()
/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/luni/src/test/java/libcore/java/util/concurrent/
DThreadPoolExecutorTest.java23 import java.util.concurrent.TimeUnit;
31 1000, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<>(10)); in testCorePoolSizeGreaterThanMax()
/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/ojluni/src/main/java/sun/nio/ch/
DCompletedFuture.java29 import java.util.concurrent.TimeUnit;
74 public V get(long timeout, TimeUnit unit) throws ExecutionException { in get()
/libcore/luni/src/main/java/libcore/icu/
DTimeZoneNames.java25 import java.util.concurrent.TimeUnit;
79 long nativeDuration = TimeUnit.NANOSECONDS.toMillis(nativeEnd - nativeStart); in create()
80 long duration = TimeUnit.NANOSECONDS.toMillis(end - start); in create()
/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()
/libcore/luni/src/test/java/libcore/java/net/
DServerSocketConcurrentCloseTest.java8 import java.util.concurrent.TimeUnit;
97 boolean serverShutdownReached = shutdownLatch.await(hardLimitSeconds, TimeUnit.SECONDS); in checkConnectIterationAndCloseSocket()

1234