Home
last modified time | relevance | path

Searched refs:toNanos (Results 1 – 25 of 30) sorted by relevance

12

/libcore/luni/src/main/java/java/util/concurrent/
DTimeUnit.java44 public long toNanos(long d) { return d; } in toNanos() method
51 public long convert(long d, TimeUnit u) { return u.toNanos(d); } in convert()
55 public long toNanos(long d) { return x(d, C1/C0, MAX/(C1/C0)); } in toNanos() method
66 public long toNanos(long d) { return x(d, C2/C0, MAX/(C2/C0)); } in toNanos() method
77 public long toNanos(long d) { return x(d, C3/C0, MAX/(C3/C0)); } in toNanos() method
88 public long toNanos(long d) { return x(d, C4/C0, MAX/(C4/C0)); } in toNanos() method
99 public long toNanos(long d) { return x(d, C5/C0, MAX/(C5/C0)); } in toNanos() method
110 public long toNanos(long d) { return x(d, C6/C0, MAX/(C6/C0)); } in toNanos() method
178 public long toNanos(long duration) { in toNanos() method in TimeUnit
DSemaphore.java380 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); in tryAcquire()
553 return sync.tryAcquireSharedNanos(permits, unit.toNanos(timeout)); in tryAcquire()
DCountDownLatch.java248 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); in await()
DAbstractExecutorService.java194 return doInvokeAny(tasks, true, unit.toNanos(timeout)); in invokeAny()
233 long nanos = unit.toNanos(timeout); in invokeAll()
DCyclicBarrier.java401 return dowait(true, unit.toNanos(timeout)); in await()
DScheduledThreadPoolExecutor.java463 return triggerTime(unit.toNanos((delay < 0) ? 0 : delay)); in triggerTime()
540 unit.toNanos(period)); in scheduleAtFixedRate()
564 unit.toNanos(-delay)); in scheduleWithFixedDelay()
1077 long nanos = unit.toNanos(timeout); in poll()
DLinkedBlockingDeque.java378 long nanos = unit.toNanos(timeout); in offerFirst()
401 long nanos = unit.toNanos(timeout); in offerLast()
482 long nanos = unit.toNanos(timeout); in pollFirst()
500 long nanos = unit.toNanos(timeout); in pollLast()
DThreadPoolExecutor.java1283 this.keepAliveTime = unit.toNanos(keepAliveTime); in ThreadPoolExecutor()
1422 long nanos = unit.toNanos(timeout); in awaitTermination()
1665 long keepAliveTime = unit.toNanos(time); in setKeepAliveTime()
DLinkedBlockingQueue.java344 long nanos = unit.toNanos(timeout); in offer()
427 long nanos = unit.toNanos(timeout); in poll()
DFutureTask.java175 (s = awaitDone(true, unit.toNanos(timeout))) <= COMPLETING) in get()
DDelayQueue.java220 long nanos = unit.toNanos(timeout); in poll()
DLinkedTransferQueue.java1099 if (xfer(e, true, TIMED, unit.toNanos(timeout)) == null) in tryTransfer()
1115 E e = xfer(null, false, TIMED, unit.toNanos(timeout)); in poll()
DSynchronousQueue.java864 if (transferer.transfer(e, true, unit.toNanos(timeout)) != null) in offer()
910 E e = transferer.transfer(null, true, unit.toNanos(timeout)); in poll()
DArrayBlockingQueue.java342 long nanos = unit.toNanos(timeout); in offer()
381 long nanos = unit.toNanos(timeout); in poll()
DExchanger.java592 long ns = unit.toNanos(timeout); in exchange()
DPhaser.java759 long nanos = unit.toNanos(timeout); in awaitAdvanceInterruptibly()
DPriorityBlockingQueue.java518 long nanos = unit.toNanos(timeout); in poll()
DForkJoinTask.java990 long ns = unit.toNanos(timeout); in get()
/libcore/jsr166-tests/src/test/java/jsr166/
DTimeUnitTest.java121 TimeUnit.DAYS.toNanos(t)); in testToNanos()
123 TimeUnit.HOURS.toNanos(t)); in testToNanos()
125 TimeUnit.MINUTES.toNanos(t)); in testToNanos()
127 TimeUnit.SECONDS.toNanos(t)); in testToNanos()
129 TimeUnit.MILLISECONDS.toNanos(t)); in testToNanos()
131 TimeUnit.MICROSECONDS.toNanos(t)); in testToNanos()
133 TimeUnit.NANOSECONDS.toNanos(t)); in testToNanos()
312 TimeUnit.MILLISECONDS.toNanos(Long.MAX_VALUE / 2)); in testToNanosSaturate()
314 TimeUnit.MILLISECONDS.toNanos(-Long.MAX_VALUE / 3)); in testToNanosSaturate()
DLockSupportTest.java44 LockSupport.parkNanos(MILLISECONDS.toNanos(millis)); in parkNanos()
63 MILLISECONDS.toNanos(millis)); in parkNanosBlocker()
DAbstractQueuedLongSynchronizerTest.java210 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in await()
233 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in assertAwaitTimesOut()
492 sync.tryAcquireNanos(MILLISECONDS.toNanos(2 * LONG_DELAY_MS)); in testTryAcquireNanos_Interruptible()
524 long nanos = MILLISECONDS.toNanos(timeoutMillis()); in testAcquireNanos_Timeout()
1129 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1170 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1194 long nanos = MILLISECONDS.toNanos(millis);
DAbstractQueuedSynchronizerTest.java213 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in await()
236 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in assertAwaitTimesOut()
495 sync.tryAcquireNanos(MILLISECONDS.toNanos(2 * LONG_DELAY_MS)); in testTryAcquireNanos_Interruptible()
527 long nanos = MILLISECONDS.toNanos(timeoutMillis()); in testAcquireNanos_Timeout()
1132 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1173 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1197 long nanos = MILLISECONDS.toNanos(millis);
DReentrantLockTest.java152 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in await()
523 long timeoutNanos = MILLISECONDS.toNanos(timeoutMillis);
/libcore/luni/src/main/java/java/util/concurrent/locks/
DReentrantLock.java413 return sync.tryAcquireNanos(1, unit.toNanos(timeout)); in tryLock()
DReentrantReadWriteLock.java843 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); in tryLock()
1087 return sync.tryAcquireNanos(1, unit.toNanos(timeout)); in tryLock()

12