Home
last modified time | relevance | path

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

123

/libcore/luni/src/test/java/tests/api/java/util/concurrent/
DTimeUnitTest.java28 TimeUnit.SECONDS.convert(t, in testConvert()
29 TimeUnit.DAYS)); in testConvert()
31 TimeUnit.SECONDS.convert(t, in testConvert()
32 TimeUnit.HOURS)); in testConvert()
34 TimeUnit.SECONDS.convert(t, in testConvert()
35 TimeUnit.MINUTES)); in testConvert()
37 TimeUnit.SECONDS.convert(t, in testConvert()
38 TimeUnit.SECONDS)); in testConvert()
40 TimeUnit.SECONDS.convert(1000L*t, in testConvert()
41 TimeUnit.MILLISECONDS)); in testConvert()
[all …]
DExecutorCompletionServiceTest.java14 import static java.util.concurrent.TimeUnit.MILLISECONDS;
161 1, 1, 30L, TimeUnit.SECONDS, in testNewTaskForCallable()
194 1, 1, 30L, TimeUnit.SECONDS, in testNewTaskForRunnable()
DAbstractExecutorServiceTest.java14 import static java.util.concurrent.TimeUnit.MILLISECONDS;
33 public boolean awaitTermination(long timeout, TimeUnit unit) { return isShutdown(); } in awaitTermination()
172 60, TimeUnit.SECONDS, in testExecute1()
195 60, TimeUnit.SECONDS, in testExecute2()
217 …final ThreadPoolExecutor p = new ThreadPoolExecutor(1,1,60, TimeUnit.SECONDS, new ArrayBlockingQue… in testInterruptedSubmit()
241 60, TimeUnit.SECONDS, in testSubmitIE()
263 60, TimeUnit.SECONDS, in testSubmitEE()
/libcore/luni/src/main/java/java/util/concurrent/
DScheduledExecutorService.java83 long delay, TimeUnit unit); in schedule()
98 long delay, TimeUnit unit); in schedule()
128 TimeUnit unit); in scheduleAtFixedRate()
155 TimeUnit unit); in scheduleWithFixedDelay()
DBlockingDeque.java291 boolean offerFirst(E e, long timeout, TimeUnit unit) in offerFirst()
313 boolean offerLast(E e, long timeout, TimeUnit unit) in offerLast()
347 E pollFirst(long timeout, TimeUnit unit) in pollFirst()
363 E pollLast(long timeout, TimeUnit unit) in pollLast()
476 boolean offer(E e, long timeout, TimeUnit unit) in offer()
527 E poll(long timeout, TimeUnit unit) in poll()
DScheduledThreadPoolExecutor.java208 public long getDelay(TimeUnit unit) { in getDelay()
209 return unit.convert(time - now(), TimeUnit.NANOSECONDS); in getDelay()
227 long d = (getDelay(TimeUnit.NANOSECONDS) - in compareTo()
228 other.getDelay(TimeUnit.NANOSECONDS)); in compareTo()
398 super(corePoolSize, Integer.MAX_VALUE, 0, TimeUnit.NANOSECONDS, in ScheduledThreadPoolExecutor()
415 super(corePoolSize, Integer.MAX_VALUE, 0, TimeUnit.NANOSECONDS, in ScheduledThreadPoolExecutor()
432 super(corePoolSize, Integer.MAX_VALUE, 0, TimeUnit.NANOSECONDS, in ScheduledThreadPoolExecutor()
453 super(corePoolSize, Integer.MAX_VALUE, 0, TimeUnit.NANOSECONDS, in ScheduledThreadPoolExecutor()
460 private long triggerTime(long delay, TimeUnit unit) { in triggerTime()
482 long headDelay = head.getDelay(TimeUnit.NANOSECONDS); in overflowFree()
[all …]
DExecutorService.java184 boolean awaitTermination(long timeout, TimeUnit unit) in awaitTermination()
291 long timeout, TimeUnit unit) in invokeAll()
338 long timeout, TimeUnit unit) in invokeAny()
DExecutors.java63 0L, TimeUnit.MILLISECONDS, in newFixedThreadPool()
88 0L, TimeUnit.MILLISECONDS, in newFixedThreadPool()
109 0L, TimeUnit.MILLISECONDS, in newSingleThreadExecutor()
130 0L, TimeUnit.MILLISECONDS, in newSingleThreadExecutor()
153 60L, TimeUnit.SECONDS, in newCachedThreadPool()
168 60L, TimeUnit.SECONDS, in newCachedThreadPool()
607 public boolean awaitTermination(long timeout, TimeUnit unit)
625 long timeout, TimeUnit unit)
634 long timeout, TimeUnit unit)
666 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
[all …]
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.java224 boolean offer(E e, long timeout, TimeUnit unit) in offer()
248 E poll(long timeout, TimeUnit unit) in poll()
DDelayQueue.java148 public boolean offer(E e, long timeout, TimeUnit unit) { in offer()
164 if (first == null || first.getDelay(TimeUnit.NANOSECONDS) > 0) in poll()
189 long delay = first.getDelay(TimeUnit.NANOSECONDS); in take()
223 public E poll(long timeout, TimeUnit unit) throws InterruptedException { in poll()
236 long delay = first.getDelay(TimeUnit.NANOSECONDS); in poll()
310 if (first == null || first.getDelay(TimeUnit.NANOSECONDS) > 0) in drainTo()
340 if (first == null || first.getDelay(TimeUnit.NANOSECONDS) > 0) in drainTo()
DDelayed.java30 long getDelay(TimeUnit unit); in getDelay()
DFuture.java140 V get(long timeout, TimeUnit unit) in get()
DAbstractExecutorService.java155 f = ecs.poll(nanos, TimeUnit.NANOSECONDS); in doInvokeAny()
200 long timeout, TimeUnit unit) in invokeAny()
236 long timeout, TimeUnit unit) in invokeAll()
266 f.get(nanos, TimeUnit.NANOSECONDS); in invokeAll()
DCompletionService.java96 Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException; in poll()
DThreadPoolExecutor.java1022 workQueue.poll(keepAliveTime, TimeUnit.NANOSECONDS) : in getTask()
1139 TimeUnit unit, in ThreadPoolExecutor()
1173 TimeUnit unit, in ThreadPoolExecutor()
1208 TimeUnit unit, in ThreadPoolExecutor()
1245 TimeUnit unit, in ThreadPoolExecutor()
1400 public boolean awaitTermination(long timeout, TimeUnit unit) in awaitTermination()
1636 public void setKeepAliveTime(long time, TimeUnit unit) { in setKeepAliveTime()
1657 public long getKeepAliveTime(TimeUnit unit) { in getKeepAliveTime()
1658 return unit.convert(keepAliveTime, TimeUnit.NANOSECONDS); in getKeepAliveTime()
DSemaphore.java379 public boolean tryAcquire(long timeout, TimeUnit unit) in tryAcquire()
552 public boolean tryAcquire(int permits, long timeout, TimeUnit unit) in tryAcquire()
DCountDownLatch.java251 public boolean await(long timeout, TimeUnit unit) in await()
DLinkedBlockingDeque.java372 public boolean offerFirst(E e, long timeout, TimeUnit unit) in offerFirst()
394 public boolean offerLast(E e, long timeout, TimeUnit unit) in offerLast()
476 public E pollFirst(long timeout, TimeUnit unit) in pollFirst()
494 public E pollLast(long timeout, TimeUnit unit) in pollLast()
621 public boolean offer(E e, long timeout, TimeUnit unit) in offer()
648 public E poll(long timeout, TimeUnit unit) throws InterruptedException { in poll()
DExecutorCompletionService.java171 public Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException { in poll()
/libcore/luni/src/main/java/java/util/concurrent/locks/
DLock.java8 import java.util.concurrent.TimeUnit;
291 boolean tryLock(long time, TimeUnit unit) throws InterruptedException; in tryLock()
DCondition.java10 import java.util.concurrent.TimeUnit;
343 boolean await(long time, TimeUnit unit) throws InterruptedException; in await()
DReentrantLock.java10 import java.util.concurrent.TimeUnit;
414 public boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException { in tryLock()
/libcore/support/src/test/java/tests/support/
DSupport_Exec.java34 import java.util.concurrent.TimeUnit;
95 out = outFuture.get(10, TimeUnit.SECONDS); in execAndGetOutput()
96 String err = errFuture.get(10, 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/org/apache/harmony/xnet/provider/jsse/
DNativeCryptoTest.java40 import java.util.concurrent.TimeUnit;
640 TestSSLHandshakeCallbacks clientCallback = client.get(TIMEOUT_SECONDS, TimeUnit.SECONDS); in test_SSL_do_handshake_normal()
641 TestSSLHandshakeCallbacks serverCallback = server.get(TIMEOUT_SECONDS, TimeUnit.SECONDS); in test_SSL_do_handshake_normal()
682 TestSSLHandshakeCallbacks clientCallback = client.get(TIMEOUT_SECONDS, TimeUnit.SECONDS); in test_SSL_do_handshake_optional_client_certificate()
683 TestSSLHandshakeCallbacks serverCallback = server.get(TIMEOUT_SECONDS, TimeUnit.SECONDS); in test_SSL_do_handshake_optional_client_certificate()
727 server.get(TIMEOUT_SECONDS, TimeUnit.SECONDS); in test_SSL_do_handshake_missing_required_certificate()
742 client.get(TIMEOUT_SECONDS, TimeUnit.SECONDS); in test_SSL_do_handshake_client_timeout()
757 server.get(TIMEOUT_SECONDS, TimeUnit.SECONDS); in test_SSL_do_handshake_server_timeout()
816 client.get(TIMEOUT_SECONDS, TimeUnit.SECONDS); in test_SSL_set_session()
817 server.get(TIMEOUT_SECONDS, TimeUnit.SECONDS); in test_SSL_set_session()
[all …]

123