/libcore/luni/src/main/java/java/util/concurrent/locks/ |
LockSupport.java | 190 * @param nanos the maximum number of nanoseconds to wait 193 public static void parkNanos(Object blocker, long nanos) { 194 if (nanos > 0) { 197 unsafe.park(false, nanos); 312 * @param nanos the maximum number of nanoseconds to wait 314 public static void parkNanos(long nanos) { 315 if (nanos > 0) 316 unsafe.park(false, nanos);
|
/libcore/luni/src/test/java/tests/api/java/util/concurrent/ |
SystemTest.java | 26 * Nanos between readings of millis is no longer than millis (plus 39 long nanos = n2 - n1; local 40 assertTrue(nanos >= 0); 41 long nanosAsMillis = nanos / 1000000; 46 * Millis between readings of nanos is less than nanos, adjusting 59 long nanos = n2 - n1; local 61 assertTrue(nanos >= 0); 62 long nanosAsMillis = nanos / 1000000;
|
AbstractQueuedLongSynchronizerTest.java | 365 long nanos = MILLISECONDS.toNanos(SHORT_DELAY_MS); 366 assertFalse(sync.tryAcquireNanos(1, nanos)); 958 long nanos = MILLISECONDS.toNanos(MEDIUM_DELAY_MS); 959 assertTrue(l.tryAcquireSharedNanos(0, nanos)); 996 long nanos = MILLISECONDS.toNanos(SMALL_DELAY_MS); 997 l.tryAcquireSharedNanos(0, nanos); [all...] |
AbstractQueuedSynchronizerTest.java | 362 long nanos = MILLISECONDS.toNanos(SHORT_DELAY_MS); 363 assertFalse(sync.tryAcquireNanos(1, nanos)); 956 long nanos = MILLISECONDS.toNanos(MEDIUM_DELAY_MS); 957 assertTrue(l.tryAcquireSharedNanos(0, nanos)); 994 long nanos = MILLISECONDS.toNanos(SMALL_DELAY_MS); 995 l.tryAcquireSharedNanos(0, nanos); [all...] |
ThreadPoolExecutorSubclassTest.java | 102 long nanos = unit.toNanos(timeout); local 107 if (nanos < 0) 109 nanos = cond.awaitNanos(nanos); [all...] |
/libcore/luni/src/main/java/java/lang/ |
LangAccessImpl.java | 47 public void parkFor(long nanos) { 48 Thread.currentThread().parkFor(nanos);
|
Object.java | 418 * @param nanos 422 * if {@code millis < 0}, {@code nanos < 0} or {@code nanos > 435 public final native void wait(long millis, int nanos) throws InterruptedException;
|
Thread.java | [all...] |
/frameworks/base/tools/preload/ |
Operation.java | 110 private static int nanosToMicros(long nanos) { 111 long micros = nanos / 1000; 114 throw new RuntimeException("Integer overflow: " + nanos);
|
/libcore/luni/src/main/java/java/util/concurrent/ |
CyclicBarrier.java | 164 private int dowait(boolean timed, long nanos) 201 else if (nanos > 0L) 202 nanos = trip.awaitNanos(nanos); 221 if (timed && nanos <= 0L) {
|
AbstractExecutorService.java | 115 boolean timed, long nanos) 155 f = ecs.poll(nanos, TimeUnit.NANOSECONDS); 159 nanos -= now - lastTime; 240 long nanos = unit.toNanos(timeout); local 255 nanos -= now - lastTime; 257 if (nanos <= 0) 263 if (nanos <= 0) 266 f.get(nanos, TimeUnit.NANOSECONDS); 273 nanos -= now - lastTime;
|
DelayQueue.java | 224 long nanos = unit.toNanos(timeout); local 231 if (nanos <= 0) 234 nanos = available.awaitNanos(nanos); 239 if (nanos <= 0) 241 if (nanos < delay || leader != null) 242 nanos = available.awaitNanos(nanos); 248 nanos -= delay - timeLeft;
|
SynchronousQueue.java | 150 * @param nanos the timeout, in nanoseconds 156 abstract Object transfer(Object e, boolean timed, long nanos); 294 Object transfer(Object e, boolean timed, long nanos) { 322 if (timed && nanos <= 0) { // can't wait 328 SNode m = awaitFulfill(s, timed, nanos); 376 * @param nanos timeout value 379 SNode awaitFulfill(SNode s, boolean timed, long nanos) { 415 nanos -= now - lastTime; 417 if (nanos <= 0) { 428 else if (nanos > spinForTimeoutThreshold [all...] |
LinkedBlockingDeque.java | 375 long nanos = unit.toNanos(timeout); local 380 if (nanos <= 0) 382 nanos = notFull.awaitNanos(nanos); 397 long nanos = unit.toNanos(timeout); local 402 if (nanos <= 0) 404 nanos = notFull.awaitNanos(nanos); 478 long nanos = unit.toNanos(timeout); local 484 if (nanos <= 0 496 long nanos = unit.toNanos(timeout); local [all...] |
Exchanger.java | 307 * @param nanos if timed, the maximum wait time 310 private Object doExchange(Object item, boolean timed, long nanos) { 331 return timed? awaitNanos(me, slot, nanos): await(me, slot); 486 * @param nanos the wait time 489 private Object awaitNanos(Node node, Slot slot, long nanos) { 501 nanos -= now - lastTime; 503 if (nanos > 0) { 511 LockSupport.parkNanos(node, nanos);
|
ArrayBlockingQueue.java | 280 long nanos = unit.toNanos(timeout); local 289 if (nanos <= 0) 292 nanos = notFull.awaitNanos(nanos); 335 long nanos = unit.toNanos(timeout); local 344 if (nanos <= 0) 347 nanos = notEmpty.awaitNanos(nanos);
|
LinkedBlockingQueue.java | 345 long nanos = unit.toNanos(timeout); local 352 if (nanos <= 0) 354 nanos = notFull.awaitNanos(nanos); 428 long nanos = unit.toNanos(timeout); local 434 if (nanos <= 0) 436 nanos = notEmpty.awaitNanos(nanos);
|
PriorityBlockingQueue.java | 242 long nanos = unit.toNanos(timeout); local 250 if (nanos <= 0) 253 nanos = notEmpty.awaitNanos(nanos);
|
ScheduledThreadPoolExecutor.java | 1078 long nanos = unit.toNanos(timeout); local [all...] |
ThreadPoolExecutor.java | 1402 long nanos = unit.toNanos(timeout); local [all...] |
/libcore/luni/src/main/java/org/apache/harmony/kernel/vm/ |
LangAccess.java | 106 * @param nanos number of nanoseconds to park for or <code>0</code> 108 * @throws IllegalArgumentException thrown if <code>nanos < 0</code> 110 public abstract void parkFor(long nanos);
|
/libcore/luni/src/main/java/java/sql/ |
Timestamp.java | 49 private int nanos; field in class:Timestamp 87 nanos = theNano; 274 return nanos; 288 theTime = theTime + (nanos / 1000000); 305 nanos = n; 367 if (nanos == 0) { 370 format(nanos, 9, sb); 481 * We must adjust for the cases where the nanos String was not 9
|
/external/guava/src/com/google/common/util/concurrent/ |
Executors.java | 302 long nanos = unit.toNanos(timeout); local 308 } else if (nanos <= 0) { 311 nanos = termination.awaitNanos(nanos);
|
AbstractFuture.java | 216 V get(long nanos) throws TimeoutException, CancellationException, 220 if (!tryAcquireSharedNanos(-1, nanos)) {
|
/dalvik/vm/ |
Sync.h | 101 s8 timeout, s4 nanos, bool interruptShouldThrow);
|