Searched refs:unit (Results 1 - 25 of 45) sorted by relevance

12

/libcore/luni/src/main/java/java/util/concurrent/
H A DDelayed.java24 * given time unit.
26 * @param unit the time unit
30 long getDelay(TimeUnit unit); argument
H A DScheduledExecutorService.java73 * @param unit the time unit of the delay parameter
82 long delay, TimeUnit unit);
90 * @param unit the time unit of the delay parameter
98 long delay, TimeUnit unit);
128 * @param unit the time unit of the initialDelay and period parameters
142 TimeUnit unit);
168 * @param unit th
81 schedule(Runnable command, long delay, TimeUnit unit) argument
97 schedule(Callable<V> callable, long delay, TimeUnit unit) argument
139 scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) argument
179 scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) argument
[all...]
H A DBlockingDeque.java48 * <td>{@link #offerFirst(Object, long, TimeUnit) offerFirst(e, time, unit)}</td>
55 * <td>{@link #pollFirst(long, TimeUnit) pollFirst(time, unit)}</td>
79 * <td>{@link #offerLast(Object, long, TimeUnit) offerLast(e, time, unit)}</td>
86 * <td>{@link #pollLast(long, TimeUnit) pollLast(time, unit)}</td>
128 * <td>{@link #offer(Object, long, TimeUnit) offer(e, time, unit)}</td>
129 * <td>{@link #offerLast(Object, long, TimeUnit) offerLast(e, time, unit)}</td>
147 * <td>{@link #poll(long, TimeUnit) poll(time, unit)}</td>
148 * <td>{@link #pollFirst(long, TimeUnit) pollFirst(time, unit)}</td>
283 * {@code unit}
284 * @param unit
295 offerFirst(E e, long timeout, TimeUnit unit) argument
317 offerLast(E e, long timeout, TimeUnit unit) argument
351 pollFirst(long timeout, TimeUnit unit) argument
367 pollLast(long timeout, TimeUnit unit) argument
484 offer(E e, long timeout, TimeUnit unit) argument
535 poll(long timeout, TimeUnit unit) argument
[all...]
H A DBlockingQueue.java46 * <td>{@link #offer(Object, long, TimeUnit) offer(e, time, unit)}</td>
53 * <td>{@link #poll(long, TimeUnit) poll(time, unit)}</td>
212 * {@code unit}
213 * @param unit a {@code TimeUnit} determining how to interpret the
224 boolean offer(E e, long timeout, TimeUnit unit) argument
241 * {@code unit}
242 * @param unit a {@code TimeUnit} determining how to interpret the
248 E poll(long timeout, TimeUnit unit) argument
H A DCompletionService.java86 * {@code unit}
87 * @param unit a {@code TimeUnit} determining how to interpret the
94 Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException; argument
H A DFuture.java130 * @param unit the time unit of the timeout argument
139 V get(long timeout, TimeUnit unit) argument
H A DTransferQueue.java91 * {@code unit}
92 * @param unit a {@code TimeUnit} determining how to interpret the
105 boolean tryTransfer(E e, long timeout, TimeUnit unit) argument
H A DCountDownLatch.java241 * @param unit the time unit of the {@code timeout} argument
247 public boolean await(long timeout, TimeUnit unit) argument
249 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout));
H A DExecutorService.java166 * @param unit the time unit of the timeout argument
171 boolean awaitTermination(long timeout, TimeUnit unit) argument
265 * @param unit the time unit of the timeout argument
275 * unit are {@code null}
280 long timeout, TimeUnit unit)
316 * @param unit the time unit of the timeout argument
320 * @throws NullPointerException if tasks, or unit, o
279 invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
328 invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
[all...]
H A DExecutors.java596 public boolean awaitTermination(long timeout, TimeUnit unit) argument
598 return e.awaitTermination(timeout, unit);
614 long timeout, TimeUnit unit)
616 return e.invokeAll(tasks, timeout, unit);
623 long timeout, TimeUnit unit)
625 return e.invokeAny(tasks, timeout, unit);
651 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { argument
652 return e.schedule(command, delay, unit);
654 public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit) { argument
655 return e.schedule(callable, delay, unit);
613 invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
622 invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
657 scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) argument
660 scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) argument
[all...]
H A DSemaphore.java379 * @param unit the time unit of the {@code timeout} argument
384 public boolean tryAcquire(long timeout, TimeUnit unit) argument
386 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout));
554 * @param unit the time unit of the {@code timeout} argument
560 public boolean tryAcquire(int permits, long timeout, TimeUnit unit) argument
563 return sync.tryAcquireSharedNanos(permits, unit.toNanos(timeout));
H A DScheduledThreadPoolExecutor.java211 public long getDelay(TimeUnit unit) { argument
212 return unit.convert(time - System.nanoTime(), NANOSECONDS);
491 private long triggerTime(long delay, TimeUnit unit) { argument
492 return triggerTime(unit.toNanos((delay < 0) ? 0 : delay));
526 TimeUnit unit) {
527 if (command == null || unit == null)
531 triggerTime(delay, unit),
543 TimeUnit unit) {
544 if (callable == null || unit == null)
548 triggerTime(delay, unit),
524 schedule(Runnable command, long delay, TimeUnit unit) argument
541 schedule(Callable<V> callable, long delay, TimeUnit unit) argument
559 scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) argument
584 scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) argument
1051 offer(Runnable e, long timeout, TimeUnit unit) argument
1118 poll(long timeout, TimeUnit unit) argument
[all...]
H A DThreadPoolExecutor.java1170 * @param unit the time unit for the {@code keepAliveTime} argument
1184 TimeUnit unit,
1186 this(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue,
1201 * @param unit the time unit for the {@code keepAliveTime} argument
1218 TimeUnit unit,
1221 this(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue,
1236 * @param unit the time unit fo
1181 ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) argument
1215 ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory) argument
1250 ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler) argument
1287 ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler) argument
1443 awaitTermination(long timeout, TimeUnit unit) argument
1691 setKeepAliveTime(long time, TimeUnit unit) argument
1715 getKeepAliveTime(TimeUnit unit) argument
[all...]
H A DCyclicBarrier.java389 * @param unit the time unit of the timeout parameter
403 public int await(long timeout, TimeUnit unit) argument
407 return dowait(true, unit.toNanos(timeout));
H A DExecutorCompletionService.java173 public Future<V> poll(long timeout, TimeUnit unit) argument
175 return completionQueue.poll(timeout, unit);
H A DAbstractExecutorService.java199 long timeout, TimeUnit unit)
201 return doInvokeAny(tasks, true, unit.toNanos(timeout));
231 long timeout, TimeUnit unit)
235 final long nanos = unit.toNanos(timeout);
198 invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
230 invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) argument
H A DDelayQueue.java145 * @param unit This parameter is ignored as the method never blocks
149 public boolean offer(E e, long timeout, TimeUnit unit) { argument
224 public E poll(long timeout, TimeUnit unit) throws InterruptedException { argument
225 long nanos = unit.toNanos(timeout);
H A DFutureTask.java170 public V get(long timeout, TimeUnit unit) argument
172 if (unit == null)
176 (s = awaitDone(true, unit.toNanos(timeout))) <= COMPLETING)
H A DLinkedBlockingDeque.java377 public boolean offerFirst(E e, long timeout, TimeUnit unit) argument
381 long nanos = unit.toNanos(timeout);
400 public boolean offerLast(E e, long timeout, TimeUnit unit) argument
404 long nanos = unit.toNanos(timeout);
483 public E pollFirst(long timeout, TimeUnit unit) argument
485 long nanos = unit.toNanos(timeout);
501 public E pollLast(long timeout, TimeUnit unit) argument
503 long nanos = unit.toNanos(timeout);
627 public boolean offer(E e, long timeout, TimeUnit unit) argument
629 return offerLast(e, timeout, unit);
654 poll(long timeout, TimeUnit unit) argument
[all...]
H A DCompletableFuture.java1900 * @param unit the time unit of the timeout argument
1908 public T get(long timeout, TimeUnit unit) argument
1911 long nanos = unit.toNanos(timeout);
2485 * with a TimeoutException, in units of {@code unit}
2486 * @param unit a {@code TimeUnit} determining how to interpret the
2493 public CompletableFuture<T> orTimeout(long timeout, TimeUnit unit) { argument
2494 if (unit == null)
2498 timeout, unit)));
2508 * with the given value, in units of {@code unit}
2516 completeOnTimeout(T value, long timeout, TimeUnit unit) argument
2542 delayedExecutor(long delay, TimeUnit unit, Executor executor) argument
2563 delayedExecutor(long delay, TimeUnit unit) argument
2623 delay(Runnable command, long delay, TimeUnit unit) argument
2649 final TimeUnit unit; field in class:CompletableFuture.DelayedExecutor
2651 DelayedExecutor(long delay, TimeUnit unit, Executor executor) argument
2711 get(long timeout, TimeUnit unit) argument
2741 orTimeout(long timeout, TimeUnit unit) argument
2744 completeOnTimeout(T value, long timeout, TimeUnit unit) argument
[all...]
/libcore/luni/src/main/java/java/util/concurrent/locks/
H A DCondition.java284 * boolean aMethod(long timeout, TimeUnit unit) {
285 * long nanos = unit.toNanos(timeout);
336 * <pre> {@code awaitNanos(unit.toNanos(time)) > 0}</pre>
339 * @param unit the time unit of the {@code time} argument
345 boolean await(long time, TimeUnit unit) throws InterruptedException; argument
H A DLock.java286 * @param unit the time unit of the {@code time} argument
294 boolean tryLock(long time, TimeUnit unit) throws InterruptedException; argument
H A DReentrantLock.java360 * lock.tryLock(timeout, unit)) {
409 * @param unit the time unit of the timeout argument
415 * @throws NullPointerException if the time unit is null
417 public boolean tryLock(long timeout, TimeUnit unit) argument
419 return sync.tryAcquireNanos(1, unit.toNanos(timeout));
/libcore/ojluni/src/main/java/sun/nio/ch/
H A DCompletedFuture.java74 public V get(long timeout, TimeUnit unit) throws ExecutionException { argument
75 if (unit == null)
/libcore/luni/src/main/java/libcore/icu/
H A DRelativeDateTimeFormatter.java71 * In the implementation below, it selects the appropriate time unit based on
75 * minResolution is HOUR_IN_MILLIS. Once getting the quantity and unit to
139 android.icu.text.RelativeDateTimeFormatter.RelativeUnit unit;
144 unit = android.icu.text.RelativeDateTimeFormatter.RelativeUnit.SECONDS;
147 unit = android.icu.text.RelativeDateTimeFormatter.RelativeUnit.MINUTES;
153 unit = android.icu.text.RelativeDateTimeFormatter.RelativeUnit.HOURS;
156 unit = android.icu.text.RelativeDateTimeFormatter.RelativeUnit.DAYS;
160 // available. Note that we cannot set up direction and unit here and
197 unit = android.icu.text.RelativeDateTimeFormatter.RelativeUnit.WEEKS;
224 return formatter.format(count, direction, unit);
[all...]

Completed in 259 milliseconds

12