/libcore/ojluni/src/test/java/nio/file/attribute/ |
D | FileTimeTest.java | 36 import java.util.concurrent.TimeUnit; 37 import static java.util.concurrent.TimeUnit.*; 50 long tomorrowInDays = TimeUnit.DAYS.convert(now, MILLISECONDS) + 1; in main() 51 long yesterdayInDays = TimeUnit.DAYS.convert(now, MILLISECONDS) - 1; in main() 116 for (TimeUnit unit: TimeUnit.values()) { in main() 124 for (TimeUnit unit : EnumSet.allOf(TimeUnit.class)) { in main() 134 for (TimeUnit unit : EnumSet.allOf(TimeUnit.class)) { in main() 138 if (unit.compareTo(TimeUnit.SECONDS) < 0) { in main() 146 if (unit.compareTo(TimeUnit.SECONDS) < 0) { in main() 265 static void cmp(long v1, TimeUnit u1, long v2, TimeUnit u2, int expected) { in cmp() [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | AsynchronousSocketChannelTest.java | 42 import java.util.concurrent.TimeUnit; 67 connectFuture.get(1000, TimeUnit.MILLISECONDS); in test_connect() 195 readFuture.get(1000, TimeUnit.MILLISECONDS); in test_close() 202 … asc.read(new ByteBuffer[]{tmp}, 0, 1, 100L, TimeUnit.MILLISECONDS, null, longCompletionHandler); in test_close() 218 asc.read(tmp, 100, TimeUnit.MILLISECONDS, null, intCompletionHandler); in test_close() 226 writeFuture.get(1000, TimeUnit.MILLISECONDS); in test_close() 233 … asc.write(new ByteBuffer[]{tmp}, 0, 1, 100, TimeUnit.MILLISECONDS, null, longCompletionHandler); in test_close() 247 asc.write(tmp, 100, TimeUnit.MILLISECONDS, null, intCompletionHandler); in test_close() 276 connectFuture.get(1000, TimeUnit.MILLISECONDS); in test_futureReadWrite() 289 assertEquals(messageSize, (int)asc.read(receivedData).get(1000, TimeUnit.MILLISECONDS)); in test_futureReadWrite() [all …]
|
D | AsynchronousChannelGroupTest.java | 28 import java.util.concurrent.TimeUnit; 106 assertFalse(acg.awaitTermination(2, TimeUnit.SECONDS)); in test_shutdown() 150 assertTrue(acg.awaitTermination(TIMEOUT, TimeUnit.SECONDS)); in test_isTerminated() 163 assertFalse(acg.awaitTermination(TIMEOUT, TimeUnit.SECONDS)); in test_awaitTermination() 167 assertTrue(acg.awaitTermination(TIMEOUT, TimeUnit.SECONDS)); in test_awaitTermination()
|
/libcore/ojluni/src/main/java/java/util/concurrent/ |
D | BlockingDeque.java | 324 boolean offerFirst(E e, long timeout, TimeUnit unit) in offerFirst() 346 boolean offerLast(E e, long timeout, TimeUnit unit) in offerLast() 380 E pollFirst(long timeout, TimeUnit unit) in pollFirst() 396 E pollLast(long timeout, TimeUnit unit) in pollLast() 513 boolean offer(E e, long timeout, TimeUnit unit) in offer() 564 E poll(long timeout, TimeUnit unit) in poll()
|
D | ScheduledExecutorService.java | 111 long delay, TimeUnit unit); in schedule() 127 long delay, TimeUnit unit); in schedule() 171 TimeUnit unit); in scheduleAtFixedRate() 211 TimeUnit unit); in scheduleWithFixedDelay()
|
D | Executors.java | 97 0L, TimeUnit.MILLISECONDS, in newFixedThreadPool() 160 0L, TimeUnit.MILLISECONDS, in newFixedThreadPool() 181 0L, TimeUnit.MILLISECONDS, in newSingleThreadExecutor() 202 0L, TimeUnit.MILLISECONDS, in newSingleThreadExecutor() 225 60L, TimeUnit.SECONDS, in newCachedThreadPool() 240 60L, TimeUnit.SECONDS, in newCachedThreadPool() 635 public boolean awaitTermination(long timeout, TimeUnit unit) 653 long timeout, TimeUnit unit) 662 long timeout, TimeUnit unit) 690 public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) { [all …]
|
D | TimeUnit.java | 73 public enum TimeUnit { enum 85 public long convert(long d, TimeUnit u) { return u.toNanos(d); } in convert() 100 public long convert(long d, TimeUnit u) { return u.toMicros(d); } in convert() 115 public long convert(long d, TimeUnit u) { return u.toMillis(d); } in convert() 130 public long convert(long d, TimeUnit u) { return u.toSeconds(d); } in convert() 146 public long convert(long d, TimeUnit u) { return u.toMinutes(d); } in convert() 162 public long convert(long d, TimeUnit u) { return u.toHours(d); } in convert() 178 public long convert(long d, TimeUnit u) { return u.toDays(d); } in convert() 226 public long convert(long sourceDuration, TimeUnit sourceUnit) { in convert()
|
D | ExecutorService.java | 200 boolean awaitTermination(long timeout, TimeUnit unit) in awaitTermination() 309 long timeout, TimeUnit unit) in invokeAll() 358 long timeout, TimeUnit unit) in invokeAny()
|
D | BlockingQueue.java | 253 boolean offer(E e, long timeout, TimeUnit unit) in offer() 277 E poll(long timeout, TimeUnit unit) in poll()
|
/libcore/ojluni/src/main/java/java/nio/channels/ |
D | AsynchronousSocketChannel.java | 29 import java.util.concurrent.TimeUnit; 403 TimeUnit unit, in read() 420 read(dst, 0L, TimeUnit.MILLISECONDS, attachment, handler); in read() 513 TimeUnit unit, in read() 560 TimeUnit unit, in write() 577 write(src, 0L, TimeUnit.MILLISECONDS, attachment, handler); in write() 664 TimeUnit unit, in write()
|
D | AsynchronousChannelGroup.java | 32 import java.util.concurrent.TimeUnit; 341 public abstract boolean awaitTermination(long timeout, TimeUnit unit) in awaitTermination()
|
/libcore/ojluni/src/main/java/java/nio/file/attribute/ |
D | FileTime.java | 32 import java.util.concurrent.TimeUnit; 57 private final TimeUnit unit; 77 private FileTime(long value, TimeUnit unit, Instant instant) { in FileTime() 95 public static FileTime from(long value, TimeUnit unit) { in from() 110 return new FileTime(value, TimeUnit.MILLISECONDS, null); in fromMillis() 141 public long to(TimeUnit unit) { in to() 146 long secs = unit.convert(instant.getEpochSecond(), TimeUnit.SECONDS); in to() 150 long nanos = unit.convert(instant.getNano(), TimeUnit.NANOSECONDS); in to() 312 return TimeUnit.SECONDS.toDays(toInstant().getEpochSecond()); in toDays() 318 return unit.toNanos(value - unit.convert(days, TimeUnit.DAYS)); in toExcessNanos() [all …]
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | ZipUtils.java | 30 import java.util.concurrent.TimeUnit; 42 TimeUnit.MICROSECONDS); in winTimeToFileTime() 49 return (ftime.to(TimeUnit.MICROSECONDS) - WINDOWS_EPOCH_IN_MICROSECONDS) * 10; in fileTimeToWinTime() 56 return FileTime.from(utime, TimeUnit.SECONDS); in unixTimeToFileTime() 63 return ftime.to(TimeUnit.SECONDS); in fileTimeToUnixTime()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | ServerSocketConcurrentCloseTest.java | 31 import java.util.concurrent.TimeUnit; 82 boolean completed = threadFinishedLatch.await(5, TimeUnit.SECONDS); in testImplAccept_detectsClosedState() 149 assertTrue("Slow server startup", serverRunnable.awaitStart(1, TimeUnit.SECONDS)); in checkConnectIterationAndCloseSocket() 150 assertTrue("Slow client startup", clientRunnable.awaitStart(1, TimeUnit.SECONDS)); in checkConnectIterationAndCloseSocket() 163 … boolean serverShutdownReached = serverRunnable.awaitShutdown(hardLimitSeconds, TimeUnit.SECONDS); in checkConnectIterationAndCloseSocket() 211 public boolean awaitStart(long timeout, TimeUnit timeUnit) throws InterruptedException { in awaitStart() 248 public boolean awaitStart(long timeout, TimeUnit timeUnit) throws InterruptedException { in awaitStart() 252 public boolean awaitShutdown(long timeout, TimeUnit timeUnit) throws InterruptedException { in awaitShutdown()
|
D | SocketTimeoutTest.java | 31 import java.util.concurrent.TimeUnit; 137 assertTrue(threadStarted.await(500, TimeUnit.MILLISECONDS)); in testSocketWriteNeverTimeouts() 142 !writeCompleted.await(TIMEOUT_MILLIS * 2, TimeUnit.MILLISECONDS); in testSocketWriteNeverTimeouts() 147 assertTrue(writeCompleted.await(5000, TimeUnit.MILLISECONDS)); in testSocketWriteNeverTimeouts()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | TimeUnitTest.java | 11 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 …]
|
/libcore/luni/src/test/java/libcore/java/lang/ref/ |
D | ReferenceQueueTest.java | 23 import java.util.concurrent.TimeUnit; 73 final long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos); in testRemoveWithSpuriousNotify() 96 final long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos); in testRemoveWithDelayedResultAndNoTimeout() 107 final long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos); in testRemoveWithDelayedResultAndTimeout() 127 countedDown = cdl.await(1000, TimeUnit.MILLISECONDS); in testCleanersCleaned() 141 executor.schedule(runnable, delayMillis, TimeUnit.MILLISECONDS); in runLater()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Process.java | 29 import java.util.concurrent.TimeUnit; 186 public boolean waitFor(long timeout, TimeUnit unit) in waitFor() 199 Math.min(TimeUnit.NANOSECONDS.toMillis(rem) + 1, 100)); in waitFor()
|
/libcore/ojluni/src/main/java/java/util/concurrent/locks/ |
D | Lock.java | 38 import java.util.concurrent.TimeUnit; 323 boolean tryLock(long time, TimeUnit unit) throws InterruptedException; in tryLock()
|
D | Condition.java | 39 import java.util.concurrent.TimeUnit; 374 boolean await(long time, TimeUnit unit) throws InterruptedException; in await()
|
/libcore/ojluni/src/main/java/java/nio/file/ |
D | WatchService.java | 30 import java.util.concurrent.TimeUnit; 159 WatchKey poll(long timeout, TimeUnit unit) in poll()
|
/libcore/luni/src/test/java/libcore/java/util/concurrent/ |
D | ThreadPoolExecutorTest.java | 23 import java.util.concurrent.TimeUnit; 31 1000, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<>(10)); in testCorePoolSizeGreaterThanMax()
|
/libcore/ojluni/src/main/java/sun/nio/fs/ |
D | UnixCopyFile.java | 33 import java.util.concurrent.TimeUnit; 194 attrs.lastAccessTime().to(TimeUnit.MICROSECONDS), in copyDirectory() 195 attrs.lastModifiedTime().to(TimeUnit.MICROSECONDS)); in copyDirectory() 198 attrs.lastAccessTime().to(TimeUnit.MICROSECONDS), in copyDirectory() 199 attrs.lastModifiedTime().to(TimeUnit.MICROSECONDS)); in copyDirectory() 274 attrs.lastAccessTime().to(TimeUnit.MICROSECONDS), in copyFile() 275 attrs.lastModifiedTime().to(TimeUnit.MICROSECONDS)); in copyFile() 278 attrs.lastAccessTime().to(TimeUnit.MICROSECONDS), in copyFile() 279 attrs.lastModifiedTime().to(TimeUnit.MICROSECONDS)); in copyFile() 356 attrs.lastAccessTime().to(TimeUnit.MICROSECONDS), in copySpecial() [all …]
|
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/ |
D | ThreadPoolExecutor.java | 47 java.util.concurrent.TimeUnit unit, in ThreadPoolExecutor() 56 java.util.concurrent.TimeUnit unit, in ThreadPoolExecutor() 66 java.util.concurrent.TimeUnit unit, in ThreadPoolExecutor() 76 java.util.concurrent.TimeUnit unit, in ThreadPoolExecutor() 204 public boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit) in awaitTermination() 265 public void setKeepAliveTime(long time, java.util.concurrent.TimeUnit unit) { in setKeepAliveTime() 269 public long getKeepAliveTime(java.util.concurrent.TimeUnit unit) { in getKeepAliveTime()
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
D | AsynchronousSocketChannelImpl.java | 219 TimeUnit unit, in implRead() 228 TimeUnit unit, in read() 283 return read(false, dst, null, 0L, TimeUnit.MILLISECONDS, null, null); in read() 289 TimeUnit unit, in read() 305 TimeUnit unit, in read() 328 TimeUnit unit, in implWrite() 337 TimeUnit unit, in write() 387 return write(false, src, null, 0L, TimeUnit.MILLISECONDS, null, null); in write() 393 TimeUnit unit, in write() 407 TimeUnit unit, in write()
|