Home
last modified time | relevance | path

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

12

/libcore/ojluni/src/test/java/util/concurrent/tck/
DTimeUnitTest.java145 DAYS.toNanos(t)); in testToNanos()
147 HOURS.toNanos(t)); in testToNanos()
149 MINUTES.toNanos(t)); in testToNanos()
151 SECONDS.toNanos(t)); in testToNanos()
153 MILLISECONDS.toNanos(t)); in testToNanos()
155 MICROSECONDS.toNanos(t)); in testToNanos()
157 NANOSECONDS.toNanos(t)); in testToNanos()
323 long ratio = x.toNanos(1) / y.toNanos(1); in testConvertSaturate()
349 MILLISECONDS.toNanos(Long.MAX_VALUE / 2)); in testToNanosSaturate()
351 MILLISECONDS.toNanos(-Long.MAX_VALUE / 3)); in testToNanosSaturate()
[all …]
DAbstractQueuedLongSynchronizerTest.java254 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in await()
282 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in assertAwaitTimesOut()
285 assertTrue(nanosRemaining > -MILLISECONDS.toNanos(LONG_DELAY_MS)); in assertAwaitTimesOut()
546 sync.tryAcquireNanos(MILLISECONDS.toNanos(2 * LONG_DELAY_MS)); in testTryAcquireNanos_Interruptible()
578 long nanos = MILLISECONDS.toNanos(timeoutMillis()); in testAcquireNanos_Timeout()
1183 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1224 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1247 long nanos = MILLISECONDS.toNanos(millis);
DAbstractQueuedSynchronizerTest.java257 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in await()
285 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in assertAwaitTimesOut()
288 assertTrue(nanosRemaining > -MILLISECONDS.toNanos(LONG_DELAY_MS)); in assertAwaitTimesOut()
549 sync.tryAcquireNanos(MILLISECONDS.toNanos(2 * LONG_DELAY_MS)); in testTryAcquireNanos_Interruptible()
581 long nanos = MILLISECONDS.toNanos(timeoutMillis()); in testAcquireNanos_Timeout()
1186 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1227 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1250 long nanos = MILLISECONDS.toNanos(millis);
DLockSupportTest.java86 LockSupport.parkNanos(MILLISECONDS.toNanos(millis)); in parkNanos()
105 MILLISECONDS.toNanos(millis)); in parkNanosBlocker()
/libcore/ojluni/src/main/java/java/util/concurrent/
DTimeUnit.java78 public long toNanos(long d) { return d; } in toNanos() method
85 public long convert(long d, TimeUnit u) { return u.toNanos(d); } in convert()
93 public long toNanos(long d) { return x(d, C1/C0, MAX/(C1/C0)); } in toNanos() method
108 public long toNanos(long d) { return x(d, C2/C0, MAX/(C2/C0)); } in toNanos() method
123 public long toNanos(long d) { return x(d, C3/C0, MAX/(C3/C0)); } in toNanos() method
139 public long toNanos(long d) { return x(d, C4/C0, MAX/(C4/C0)); } in toNanos() method
155 public long toNanos(long d) { return x(d, C5/C0, MAX/(C5/C0)); } in toNanos() method
171 public long toNanos(long d) { return x(d, C6/C0, MAX/(C6/C0)); } in toNanos() method
238 public long toNanos(long duration) { in toNanos() method in TimeUnit
DSemaphore.java415 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); in tryAcquire()
592 return sync.tryAcquireSharedNanos(permits, unit.toNanos(timeout)); in tryAcquire()
DCountDownLatch.java278 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); in await()
DAbstractExecutorService.java230 return doInvokeAny(tasks, true, unit.toNanos(timeout)); in invokeAny()
264 final long nanos = unit.toNanos(timeout); in invokeAll()
DCyclicBarrier.java436 return dowait(true, unit.toNanos(timeout)); in await()
DScheduledThreadPoolExecutor.java521 return triggerTime(unit.toNanos((delay < 0) ? 0 : delay)); in triggerTime()
600 unit.toNanos(period), in scheduleAtFixedRate()
625 -unit.toNanos(delay), in scheduleWithFixedDelay()
1149 long nanos = unit.toNanos(timeout); in poll()
DLinkedBlockingDeque.java410 long nanos = unit.toNanos(timeout); in offerFirst()
433 long nanos = unit.toNanos(timeout); in offerLast()
514 long nanos = unit.toNanos(timeout); in pollFirst()
532 long nanos = unit.toNanos(timeout); in pollLast()
DThreadPoolExecutor.java1338 this.keepAliveTime = unit.toNanos(keepAliveTime); in ThreadPoolExecutor()
1479 long nanos = unit.toNanos(timeout); in awaitTermination()
1731 long keepAliveTime = unit.toNanos(time); in setKeepAliveTime()
DFutureTask.java205 (s = awaitDone(true, unit.toNanos(timeout))) <= COMPLETING) in get()
DDelayQueue.java254 long nanos = unit.toNanos(timeout); in poll()
DLinkedBlockingQueue.java376 long nanos = unit.toNanos(timeout); in offer()
459 long nanos = unit.toNanos(timeout); in poll()
/libcore/jsr166-tests/src/test/java/jsr166/
DTimeUnitTest.java112 DAYS.toNanos(t)); in testToNanos()
114 HOURS.toNanos(t)); in testToNanos()
116 MINUTES.toNanos(t)); in testToNanos()
118 SECONDS.toNanos(t)); in testToNanos()
120 MILLISECONDS.toNanos(t)); in testToNanos()
122 MICROSECONDS.toNanos(t)); in testToNanos()
124 NANOSECONDS.toNanos(t)); in testToNanos()
295 MILLISECONDS.toNanos(Long.MAX_VALUE / 2)); in testToNanosSaturate()
297 MILLISECONDS.toNanos(-Long.MAX_VALUE / 3)); in testToNanosSaturate()
DAbstractQueuedLongSynchronizerTest.java226 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in await()
254 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in assertAwaitTimesOut()
257 assertTrue(nanosRemaining > -MILLISECONDS.toNanos(LONG_DELAY_MS)); in assertAwaitTimesOut()
518 sync.tryAcquireNanos(MILLISECONDS.toNanos(2 * LONG_DELAY_MS)); in testTryAcquireNanos_Interruptible()
550 long nanos = MILLISECONDS.toNanos(timeoutMillis()); in testAcquireNanos_Timeout()
1155 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1196 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1219 long nanos = MILLISECONDS.toNanos(millis);
DAbstractQueuedSynchronizerTest.java229 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in await()
257 long nanosTimeout = MILLISECONDS.toNanos(timeoutMillis); in assertAwaitTimesOut()
260 assertTrue(nanosRemaining > -MILLISECONDS.toNanos(LONG_DELAY_MS)); in assertAwaitTimesOut()
521 sync.tryAcquireNanos(MILLISECONDS.toNanos(2 * LONG_DELAY_MS)); in testTryAcquireNanos_Interruptible()
553 long nanos = MILLISECONDS.toNanos(timeoutMillis()); in testAcquireNanos_Timeout()
1158 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1199 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1222 long nanos = MILLISECONDS.toNanos(millis);
DLockSupportTest.java62 LockSupport.parkNanos(MILLISECONDS.toNanos(millis)); in parkNanos()
81 MILLISECONDS.toNanos(millis)); in parkNanosBlocker()
/libcore/ojluni/src/main/java/java/lang/
DProcess.java190 long rem = unit.toNanos(timeout); in waitFor()
201 rem = unit.toNanos(timeout) - (System.nanoTime() - startTime); in waitFor()
/libcore/ojluni/src/main/java/java/nio/file/attribute/
DFileTime.java318 return unit.toNanos(value - unit.convert(days, TimeUnit.DAYS)); in toExcessNanos()
320 return TimeUnit.SECONDS.toNanos(toInstant().getEpochSecond() in toExcessNanos()
/libcore/ojluni/src/main/java/java/util/concurrent/locks/
DReentrantLock.java451 return sync.tryAcquireNanos(1, unit.toNanos(timeout)); in tryLock()
DReentrantReadWriteLock.java873 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); in tryLock()
1122 return sync.tryAcquireNanos(1, unit.toNanos(timeout)); in tryLock()
/libcore/ojluni/src/test/java/nio/file/attribute/
DFileTimeTest.java249 MILLISECONDS.toNanos(1000))) in main()
256 -MILLISECONDS.toNanos(1))) in main()
/libcore/ojluni/src/main/java/java/time/
DClock.java285 long tickNanos = tickDuration.toNanos(); in tick()

12