/libcore/jsr166-tests/src/test/java/jsr166/ |
D | SystemTest.java | 46 long nanos = n2 - n1; in testNanoTime1() local 47 assertTrue(nanos >= 0); in testNanoTime1() 48 long nanosAsMillis = nanos / 1000000; in testNanoTime1() 66 long nanos = n2 - n1; in testNanoTime2() local 68 assertTrue(nanos >= 0); in testNanoTime2() 69 long nanosAsMillis = nanos / 1000000; in testNanoTime2()
|
D | AbstractQueuedSynchronizerTest.java | 66 public boolean tryAcquireNanos(long nanos) throws InterruptedException { in tryAcquireNanos() argument 67 return tryAcquireNanos(LOCKED, nanos); in tryAcquireNanos() 545 long nanos = MILLISECONDS.toNanos(timeoutMillis()); in testAcquireNanos_Timeout() 546 assertFalse(sync.tryAcquireNanos(nanos)); in testAcquireNanos_Timeout() 1150 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS); 1151 assertTrue(l.tryAcquireSharedNanos(0, nanos)); 1153 assertTrue(l.tryAcquireSharedNanos(0, nanos)); 1191 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS); 1192 l.tryAcquireSharedNanos(0, nanos); 1214 long nanos = MILLISECONDS.toNanos(millis); [all …]
|
D | AbstractQueuedLongSynchronizerTest.java | 62 public boolean tryAcquireNanos(long nanos) throws InterruptedException { in tryAcquireNanos() argument 63 return tryAcquireNanos(LOCKED, nanos); in tryAcquireNanos() 542 long nanos = MILLISECONDS.toNanos(timeoutMillis()); in testAcquireNanos_Timeout() 543 assertFalse(sync.tryAcquireNanos(nanos)); in testAcquireNanos_Timeout() 1147 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS); 1148 assertTrue(l.tryAcquireSharedNanos(0, nanos)); 1150 assertTrue(l.tryAcquireSharedNanos(0, nanos)); 1188 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS); 1189 l.tryAcquireSharedNanos(0, nanos); 1211 long nanos = MILLISECONDS.toNanos(millis); [all …]
|
D | ThreadPoolExecutorSubclassTest.java | 127 long nanos = unit.toNanos(timeout); in get() local 132 if (nanos < 0) in get() 134 nanos = cond.awaitNanos(nanos); in get()
|
/libcore/luni/src/main/java/java/sql/ |
D | Timestamp.java | 50 private int nanos; field in Timestamp 88 nanos = theNano; in Timestamp() 275 return nanos; in getNanos() 289 theTime = theTime + (nanos / 1000000); in getTime() 306 nanos = n; in setNanos() 368 if (nanos == 0) { in toString() 371 format(nanos, 9, sb); in toString() 448 int nanos; in valueOf() local 452 nanos = 0; in valueOf() 459 nanos = Integer.parsePositiveInt(s.substring(position + 1)); in valueOf() [all …]
|
/libcore/libart/src/main/java/java/lang/ |
D | Thread.java | 762 public final void join(long millis, int nanos) throws InterruptedException { in join() argument 763 if (millis < 0 || nanos < 0 || nanos >= NANOS_PER_MILLI) { in join() 764 throw new IllegalArgumentException("bad timeout: millis=" + millis + ",nanos=" + nanos); in join() 768 boolean overflow = millis >= (Long.MAX_VALUE - nanos) / NANOS_PER_MILLI; in join() 769 boolean forever = (millis | nanos) == 0; in join() 781 long nanosToWait = millis * NANOS_PER_MILLI + nanos; in join() 786 lock.wait(millis, nanos); in join() 796 nanos = (int) (nanosRemaining - millis * NANOS_PER_MILLI); in join() 1002 public static void sleep(long millis, int nanos) throws InterruptedException { in sleep() argument 1006 if (nanos < 0) { in sleep() [all …]
|
D | Object.java | 465 public final native void wait(long millis, int nanos) throws InterruptedException; in wait() argument
|
/libcore/luni/src/main/java/java/util/concurrent/locks/ |
D | LockSupport.java | 194 public static void parkNanos(Object blocker, long nanos) { in parkNanos() argument 195 if (nanos > 0) { in parkNanos() 198 unsafe.park(false, nanos); in parkNanos() 319 public static void parkNanos(long nanos) { in parkNanos() argument 320 if (nanos > 0) in parkNanos() 321 unsafe.park(false, nanos); in parkNanos()
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | AbstractExecutorService.java | 112 boolean timed, long nanos) in doInvokeAny() argument 133 final long deadline = timed ? System.nanoTime() + nanos : 0L; in doInvokeAny() 152 f = ecs.poll(nanos, TimeUnit.NANOSECONDS); in doInvokeAny() 155 nanos = deadline - System.nanoTime(); in doInvokeAny() 234 long nanos = unit.toNanos(timeout); in invokeAll() local 241 final long deadline = System.nanoTime() + nanos; in invokeAll() 248 nanos = deadline - System.nanoTime(); in invokeAll() 249 if (nanos <= 0L) in invokeAll() 256 if (nanos <= 0L) in invokeAll() 259 f.get(nanos, TimeUnit.NANOSECONDS); in invokeAll() [all …]
|
D | CyclicBarrier.java | 166 private int dowait(boolean timed, long nanos) in dowait() argument 203 else if (nanos > 0L) in dowait() 204 nanos = trip.awaitNanos(nanos); in dowait() 223 if (timed && nanos <= 0L) { in dowait()
|
D | DelayQueue.java | 221 long nanos = unit.toNanos(timeout); in poll() local 228 if (nanos <= 0) in poll() 231 nanos = available.awaitNanos(nanos); in poll() 236 if (nanos <= 0) in poll() 239 if (nanos < delay || leader != null) in poll() 240 nanos = available.awaitNanos(nanos); in poll() 246 nanos -= delay - timeLeft; in poll()
|
D | SynchronousQueue.java | 152 abstract E transfer(E e, boolean timed, long nanos); in transfer() argument 298 E transfer(E e, boolean timed, long nanos) { in transfer() argument 326 if (timed && nanos <= 0) { // can't wait in transfer() 332 SNode m = awaitFulfill(s, timed, nanos); in transfer() 383 SNode awaitFulfill(SNode s, boolean timed, long nanos) { in awaitFulfill() argument 406 final long deadline = timed ? System.nanoTime() + nanos : 0L; in awaitFulfill() 417 nanos = deadline - System.nanoTime(); in awaitFulfill() 418 if (nanos <= 0L) { in awaitFulfill() 429 else if (nanos > spinForTimeoutThreshold) in awaitFulfill() 430 LockSupport.parkNanos(this, nanos); in awaitFulfill() [all …]
|
D | LinkedBlockingDeque.java | 378 long nanos = unit.toNanos(timeout); in offerFirst() local 383 if (nanos <= 0) in offerFirst() 385 nanos = notFull.awaitNanos(nanos); in offerFirst() 401 long nanos = unit.toNanos(timeout); in offerLast() local 406 if (nanos <= 0) in offerLast() 408 nanos = notFull.awaitNanos(nanos); in offerLast() 482 long nanos = unit.toNanos(timeout); in pollFirst() local 488 if (nanos <= 0) in pollFirst() 490 nanos = notEmpty.awaitNanos(nanos); in pollFirst() 500 long nanos = unit.toNanos(timeout); in pollLast() local [all …]
|
D | Phaser.java | 757 long nanos = unit.toNanos(timeout); in awaitAdvanceInterruptibly() local 764 QNode node = new QNode(this, phase, true, true, nanos); in awaitAdvanceInterruptibly() 1064 long nanos; field in Phaser.QNode 1070 boolean timed, long nanos) { in QNode() argument 1074 this.nanos = nanos; in QNode() 1076 this.deadline = timed ? System.nanoTime() + nanos : 0L; in QNode() 1094 if (nanos > 0L) { in isReleasable() 1095 nanos = deadline - System.nanoTime(); in isReleasable() 1097 if (nanos <= 0L) { in isReleasable() 1110 else if (nanos > 0L) in block() [all …]
|
D | FutureTask.java | 366 private int awaitDone(boolean timed, long nanos) in awaitDone() argument 394 if (timed && nanos <= 0L) in awaitDone() 407 parkNanos = nanos; in awaitDone() 410 if (elapsed >= nanos) { in awaitDone() 414 parkNanos = nanos - elapsed; in awaitDone()
|
D | LinkedBlockingQueue.java | 344 long nanos = unit.toNanos(timeout); in offer() local 351 if (nanos <= 0) in offer() 353 nanos = notFull.awaitNanos(nanos); in offer() 427 long nanos = unit.toNanos(timeout); in poll() local 433 if (nanos <= 0) in poll() 435 nanos = notEmpty.awaitNanos(nanos); in poll()
|
D | ScheduledThreadPoolExecutor.java | 1107 long nanos = unit.toNanos(timeout); in poll() local 1114 if (nanos <= 0) in poll() 1117 nanos = available.awaitNanos(nanos); in poll() 1122 if (nanos <= 0) in poll() 1125 if (nanos < delay || leader != null) in poll() 1126 nanos = available.awaitNanos(nanos); in poll() 1132 nanos -= delay - timeLeft; in poll()
|
D | LinkedTransferQueue.java | 574 private E xfer(E e, boolean haveData, int how, long nanos) { in xfer() argument 614 return awaitMatch(s, pred, e, (how == TIMED), nanos); in xfer() 667 private E awaitMatch(Node s, Node pred, E e, boolean timed, long nanos) { in awaitMatch() argument 668 final long deadline = timed ? System.nanoTime() + nanos : 0L; in awaitMatch() 680 if ((w.isInterrupted() || (timed && nanos <= 0)) && in awaitMatch() 699 nanos = deadline - System.nanoTime(); in awaitMatch() 700 if (nanos > 0L) in awaitMatch() 701 LockSupport.parkNanos(this, nanos); in awaitMatch()
|
D | ArrayBlockingQueue.java | 326 long nanos = unit.toNanos(timeout); in offer() local 331 if (nanos <= 0) in offer() 333 nanos = notFull.awaitNanos(nanos); in offer() 365 long nanos = unit.toNanos(timeout); in poll() local 370 if (nanos <= 0) in poll() 372 nanos = notEmpty.awaitNanos(nanos); in poll()
|
D | PriorityBlockingQueue.java | 518 long nanos = unit.toNanos(timeout); in poll() local 523 while ( (result = dequeue()) == null && nanos > 0) in poll() 524 nanos = notEmpty.awaitNanos(nanos); in poll()
|
D | ThreadPoolExecutor.java | 1425 long nanos = unit.toNanos(timeout); in awaitTermination() local 1432 if (nanos <= 0) in awaitTermination() 1434 nanos = termination.awaitNanos(nanos); in awaitTermination()
|
D | ForkJoinPool.java | 2986 long nanos = unit.toNanos(timeout); in awaitTermination() local 2989 if (nanos <= 0L) in awaitTermination() 2991 long deadline = System.nanoTime() + nanos; in awaitTermination() 2996 if (nanos <= 0L) in awaitTermination() 2998 long millis = TimeUnit.NANOSECONDS.toMillis(nanos); in awaitTermination() 3000 nanos = deadline - System.nanoTime(); in awaitTermination() 3017 long nanos = unit.toNanos(timeout); in awaitQuiescence() local 3032 if ((System.nanoTime() - startTime) > nanos) in awaitQuiescence()
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | CharacterBenchmark.java | 41 @Override public double nanosToUnits(double nanos) { in nanosToUnits() argument 42 return nanos / 65536; in nanosToUnits()
|