Searched refs:TimeUnit (Results 1 - 25 of 160) sorted by relevance

1234567

/openjdk7/jdk/src/share/classes/java/util/concurrent/
H A DDelayed.java61 long getDelay(TimeUnit unit);
H A DScheduledExecutorService.java62 * TimeUnit.MILLISECONDS)</tt>. Beware however that expiration of a
76 * import static java.util.concurrent.TimeUnit.*;
113 long delay, TimeUnit unit);
128 long delay, TimeUnit unit);
158 TimeUnit unit);
185 TimeUnit unit);
H A DBlockingDeque.java70 * <td>{@link #offerFirst(Object, long, TimeUnit) offerFirst(e, time, unit)}</td>
77 * <td>{@link #pollFirst(long, TimeUnit) pollFirst(time, unit)}</td>
101 * <td>{@link #offerLast(Object, long, TimeUnit) offerLast(e, time, unit)}</td>
108 * <td>{@link #pollLast(long, TimeUnit) pollLast(time, unit)}</td>
150 * <td>{@link #offer(Object, long, TimeUnit) offer(e, time, unit)}</td>
151 * <td>{@link #offerLast(Object, long, TimeUnit) offerLast(e, time, unit)}</td>
169 * <td>{@link #poll(long, TimeUnit) poll(time, unit)}</td>
170 * <td>{@link #pollFirst(long, TimeUnit) pollFirst(time, unit)}</td>
306 * @param unit a <tt>TimeUnit</tt> determining how to interpret the
317 boolean offerFirst(E e, long timeout, TimeUnit uni
[all...]
H A DBlockingQueue.java70 * <td>{@link #offer(Object, long, TimeUnit) offer(e, time, unit)}</td>
77 * <td>{@link #poll(long, TimeUnit) poll(time, unit)}</td>
242 * @param unit a <tt>TimeUnit</tt> determining how to interpret the
253 boolean offer(E e, long timeout, TimeUnit unit)
271 * @param unit a <tt>TimeUnit</tt> determining how to interpret the
277 E poll(long timeout, TimeUnit unit)
H A DCompletionService.java118 * @param unit a <tt>TimeUnit</tt> determining how to interpret the
125 Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException;
H A DFuture.java167 V get(long timeout, TimeUnit unit)
H A DTransferQueue.java47 * {@linkplain #tryTransfer(Object,long,TimeUnit) time-out} versions of
74 * {@link #take} or timed {@link #poll(long,TimeUnit) poll}),
93 * {@link #take} or timed {@link #poll(long,TimeUnit) poll}),
113 * {@link #take} or timed {@link #poll(long,TimeUnit) poll}),
121 * @param unit a {@code TimeUnit} determining how to interpret the
134 boolean tryTransfer(E e, long timeout, TimeUnit unit)
140 * timed {@link #poll(long,TimeUnit) poll}.
150 * {@link #poll(long,TimeUnit) poll}. The return value is an
H A DExecutorService.java116 * if (!pool.awaitTermination(60, TimeUnit.SECONDS)) {
119 * if (!pool.awaitTermination(60, TimeUnit.SECONDS))
214 boolean awaitTermination(long timeout, TimeUnit unit)
321 long timeout, TimeUnit unit)
368 long timeout, TimeUnit unit)
H A DExecutors.java90 0L, TimeUnit.MILLISECONDS,
115 0L, TimeUnit.MILLISECONDS,
136 0L, TimeUnit.MILLISECONDS,
157 0L, TimeUnit.MILLISECONDS,
180 60L, TimeUnit.SECONDS,
195 60L, TimeUnit.SECONDS,
633 public boolean awaitTermination(long timeout, TimeUnit unit)
651 long timeout, TimeUnit unit)
660 long timeout, TimeUnit unit)
688 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit uni
[all...]
H A DScheduledThreadPoolExecutor.java233 public long getDelay(TimeUnit unit) {
234 return unit.convert(time - now(), TimeUnit.NANOSECONDS);
252 long d = (getDelay(TimeUnit.NANOSECONDS) -
253 other.getDelay(TimeUnit.NANOSECONDS));
427 super(corePoolSize, Integer.MAX_VALUE, 0, TimeUnit.NANOSECONDS,
444 super(corePoolSize, Integer.MAX_VALUE, 0, TimeUnit.NANOSECONDS,
461 super(corePoolSize, Integer.MAX_VALUE, 0, TimeUnit.NANOSECONDS,
482 super(corePoolSize, Integer.MAX_VALUE, 0, TimeUnit.NANOSECONDS,
489 private long triggerTime(long delay, TimeUnit unit) {
511 long headDelay = head.getDelay(TimeUnit
[all...]
/openjdk7/jdk/src/share/classes/java/nio/file/
H A DWatchService.java30 import java.util.concurrent.TimeUnit;
114 * #poll(long,TimeUnit) poll} methods waiting for a key to be queued then
148 * a {@code TimeUnit} determining how to interpret the timeout
159 WatchKey poll(long timeout, TimeUnit unit)
/openjdk7/jdk/src/share/classes/java/util/concurrent/locks/
H A DLock.java37 import java.util.concurrent.TimeUnit;
99 * the lock that can timeout ({@link #tryLock(long, TimeUnit)}).
320 boolean tryLock(long time, TimeUnit unit) throws InterruptedException;
H A DCondition.java312 * boolean aMethod(long timeout, TimeUnit unit) {
374 boolean await(long time, TimeUnit unit) throws InterruptedException;
/openjdk7/jdk/test/java/util/concurrent/ScheduledThreadPoolExecutor/
H A DStress.java47 pool.scheduleAtFixedRate(incTask, 0, 10, TimeUnit.MILLISECONDS);
52 pool.awaitTermination(1L, TimeUnit.DAYS);
H A DDelayOverflow.java52 pool.schedule(r, 0, TimeUnit.MILLISECONDS);
55 pool.schedule(Executors.callable(r), 0, TimeUnit.DAYS);
58 pool.scheduleWithFixedDelay(r, 0, 1000, TimeUnit.NANOSECONDS);
61 pool.scheduleAtFixedRate(r, 0, 1000, TimeUnit.MILLISECONDS);
72 pool.schedule(r, Long.MAX_VALUE, TimeUnit.MILLISECONDS);
75 pool.schedule(Executors.callable(r), Long.MAX_VALUE, TimeUnit.DAYS);
78 pool.scheduleWithFixedDelay(r, Long.MAX_VALUE, 1000, TimeUnit.NANOSECONDS);
81 pool.scheduleAtFixedRate(r, Long.MAX_VALUE, 1000, TimeUnit.MILLISECONDS);
114 pool.schedule(keepPoolBusy, 0, TimeUnit.SECONDS);
121 check(runLatch.await(10L, TimeUnit
[all...]
H A DDecorateTask.java70 public V get(long timeout, TimeUnit unit)
74 public long getDelay(TimeUnit unit) {
82 pool.scheduleAtFixedRate(countDownTask(latch1), 0L, 1L, TimeUnit.NANOSECONDS);
83 pool.scheduleWithFixedDelay(countDownTask(latch2), 0L, 1L, TimeUnit.NANOSECONDS);
87 pool.awaitTermination(1L, TimeUnit.MINUTES);
/openjdk7/jdk/test/java/util/concurrent/DelayQueue/
H A DStress.java25 import static java.util.concurrent.TimeUnit.*;
43 public long getDelay(TimeUnit unit) {
57 q.poll(10L, TimeUnit.SECONDS);
/openjdk7/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/
H A DCompletedFuture.java30 import java.util.concurrent.TimeUnit;
66 public T get(long timeout, TimeUnit unit) throws ExecutionException {
/openjdk7/jdk/test/java/nio/file/attribute/FileTime/
H A DBasic.java30 import java.util.concurrent.TimeUnit;
31 import static java.util.concurrent.TimeUnit.*;
40 long tomorrowInDays = TimeUnit.DAYS.convert(now, MILLISECONDS) + 1;
41 long yesterdayInDays = TimeUnit.DAYS.convert(now, MILLISECONDS) - 1;
64 // to(TimeUnit)
74 for (TimeUnit unit: TimeUnit.values()) {
125 static void cmp(long v1, TimeUnit u1, long v2, TimeUnit u2, int expected) {
131 static void eq(long v1, TimeUnit u
[all...]
/openjdk7/jdk/test/java/util/concurrent/BlockingQueue/
H A DPollMemoryLeak.java58 q.poll(1, TimeUnit.NANOSECONDS);
/openjdk7/jdk/test/java/util/concurrent/locks/Lock/
H A DTimedAcquire.java38 if (sem.tryAcquire(delay, TimeUnit.MILLISECONDS))
/openjdk7/jdk/src/share/classes/java/nio/channels/
H A DAsynchronousSocketChannel.java29 import java.util.concurrent.TimeUnit;
96 * <p> The {@link #read(ByteBuffer,long,TimeUnit,Object,CompletionHandler) read}
97 * and {@link #write(ByteBuffer,long,TimeUnit,Object,CompletionHandler) write}
390 TimeUnit unit,
407 read(dst, 0L, TimeUnit.MILLISECONDS, attachment, handler);
498 TimeUnit unit,
543 TimeUnit unit,
560 write(src, 0L, TimeUnit.MILLISECONDS, attachment, handler);
645 TimeUnit unit,
H A DAsynchronousChannelGroup.java32 import java.util.concurrent.TimeUnit;
342 public abstract boolean awaitTermination(long timeout, TimeUnit unit)
/openjdk7/jdk/test/java/util/concurrent/TimeUnit/
H A DBasic.java26 * @summary Basic tests for TimeUnit
33 import static java.util.concurrent.TimeUnit.*;
38 for (TimeUnit u : TimeUnit.values()) {
40 check(u instanceof TimeUnit);
42 for (TimeUnit v : TimeUnit.values())
/openjdk7/jdk/src/share/classes/java/nio/file/attribute/
H A DFileTime.java34 import java.util.concurrent.TimeUnit;
61 private final TimeUnit unit;
85 private FileTime(long value, TimeUnit unit) {
104 public static FileTime from(long value, TimeUnit unit) {
118 return new FileTime(value, TimeUnit.MILLISECONDS);
134 public long to(TimeUnit unit) {
241 if (unit.compareTo(TimeUnit.SECONDS) < 0) {
320 DaysAndNanos(long value, TimeUnit unit) {

Completed in 55 milliseconds

1234567