Home
last modified time | relevance | path

Searched refs:nanos (Results 1 – 24 of 24) sorted by relevance

/libcore/jsr166-tests/src/test/java/jsr166/
DSystemTest.java36 long nanos = n2 - n1; in testNanoTime1() local
37 assertTrue(nanos >= 0); in testNanoTime1()
38 long nanosAsMillis = nanos / 1000000; in testNanoTime1()
56 long nanos = n2 - n1; in testNanoTime2() local
58 assertTrue(nanos >= 0); in testNanoTime2()
59 long nanosAsMillis = nanos / 1000000; in testNanoTime2()
DAbstractQueuedLongSynchronizerTest.java46 public boolean tryAcquireNanos(long nanos) throws InterruptedException { in tryAcquireNanos() argument
47 return tryAcquireNanos(LOCKED, nanos); in tryAcquireNanos()
524 long nanos = MILLISECONDS.toNanos(timeoutMillis()); in testAcquireNanos_Timeout()
525 assertFalse(sync.tryAcquireNanos(nanos)); in testAcquireNanos_Timeout()
1129 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1130 assertTrue(l.tryAcquireSharedNanos(0, nanos));
1132 assertTrue(l.tryAcquireSharedNanos(0, nanos));
1170 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1171 l.tryAcquireSharedNanos(0, nanos);
1194 long nanos = MILLISECONDS.toNanos(millis);
[all …]
DAbstractQueuedSynchronizerTest.java50 public boolean tryAcquireNanos(long nanos) throws InterruptedException { in tryAcquireNanos() argument
51 return tryAcquireNanos(LOCKED, nanos); in tryAcquireNanos()
527 long nanos = MILLISECONDS.toNanos(timeoutMillis()); in testAcquireNanos_Timeout()
528 assertFalse(sync.tryAcquireNanos(nanos)); in testAcquireNanos_Timeout()
1132 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1133 assertTrue(l.tryAcquireSharedNanos(0, nanos));
1135 assertTrue(l.tryAcquireSharedNanos(0, nanos));
1173 long nanos = MILLISECONDS.toNanos(2 * LONG_DELAY_MS);
1174 l.tryAcquireSharedNanos(0, nanos);
1197 long nanos = MILLISECONDS.toNanos(millis);
[all …]
DThreadPoolExecutorSubclassTest.java97 long nanos = unit.toNanos(timeout); in get() local
102 if (nanos < 0) in get()
104 nanos = cond.awaitNanos(nanos); in get()
/libcore/luni/src/main/java/java/sql/
DTimestamp.java50 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/
DThread.java762 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 …]
DObject.java464 public final native void wait(long millis, int nanos) throws InterruptedException; in wait() argument
/libcore/luni/src/main/java/java/util/concurrent/locks/
DLockSupport.java193 public static void parkNanos(Object blocker, long nanos) { in parkNanos() argument
194 if (nanos > 0) { in parkNanos()
197 unsafe.park(false, nanos); in parkNanos()
318 public static void parkNanos(long nanos) { in parkNanos() argument
319 if (nanos > 0) in parkNanos()
320 unsafe.park(false, nanos); in parkNanos()
/libcore/luni/src/main/java/java/util/concurrent/
DAbstractExecutorService.java111 boolean timed, long nanos) in doInvokeAny() argument
132 final long deadline = timed ? System.nanoTime() + nanos : 0L; in doInvokeAny()
151 f = ecs.poll(nanos, TimeUnit.NANOSECONDS); in doInvokeAny()
154 nanos = deadline - System.nanoTime(); in doInvokeAny()
233 long nanos = unit.toNanos(timeout); in invokeAll() local
240 final long deadline = System.nanoTime() + nanos; in invokeAll()
247 nanos = deadline - System.nanoTime(); in invokeAll()
248 if (nanos <= 0L) in invokeAll()
255 if (nanos <= 0L) in invokeAll()
258 f.get(nanos, TimeUnit.NANOSECONDS); in invokeAll()
[all …]
DCyclicBarrier.java165 private int dowait(boolean timed, long nanos) in dowait() argument
202 else if (nanos > 0L) in dowait()
203 nanos = trip.awaitNanos(nanos); in dowait()
222 if (timed && nanos <= 0L) { in dowait()
DDelayQueue.java220 long nanos = unit.toNanos(timeout); in poll() local
227 if (nanos <= 0) in poll()
230 nanos = available.awaitNanos(nanos); in poll()
235 if (nanos <= 0) in poll()
238 if (nanos < delay || leader != null) in poll()
239 nanos = available.awaitNanos(nanos); in poll()
245 nanos -= delay - timeLeft; in poll()
DSynchronousQueue.java151 abstract E transfer(E e, boolean timed, long nanos); in transfer() argument
297 E transfer(E e, boolean timed, long nanos) { in transfer() argument
325 if (timed && nanos <= 0) { // can't wait in transfer()
331 SNode m = awaitFulfill(s, timed, nanos); in transfer()
382 SNode awaitFulfill(SNode s, boolean timed, long nanos) { in awaitFulfill() argument
405 final long deadline = timed ? System.nanoTime() + nanos : 0L; in awaitFulfill()
416 nanos = deadline - System.nanoTime(); in awaitFulfill()
417 if (nanos <= 0L) { in awaitFulfill()
428 else if (nanos > spinForTimeoutThreshold) in awaitFulfill()
429 LockSupport.parkNanos(this, nanos); in awaitFulfill()
[all …]
DLinkedBlockingDeque.java378 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 …]
DPhaser.java759 long nanos = unit.toNanos(timeout); in awaitAdvanceInterruptibly() local
766 QNode node = new QNode(this, phase, true, true, nanos); in awaitAdvanceInterruptibly()
1066 long nanos; field in Phaser.QNode
1072 boolean timed, long nanos) { in QNode() argument
1076 this.nanos = nanos; in QNode()
1078 this.deadline = timed ? System.nanoTime() + nanos : 0L; in QNode()
1096 if (nanos > 0L) { in isReleasable()
1097 nanos = deadline - System.nanoTime(); in isReleasable()
1099 if (nanos <= 0L) { in isReleasable()
1112 else if (nanos > 0L) in block()
[all …]
DFutureTask.java367 private int awaitDone(boolean timed, long nanos) in awaitDone() argument
369 final long deadline = timed ? System.nanoTime() + nanos : 0L; in awaitDone()
392 nanos = deadline - System.nanoTime(); in awaitDone()
393 if (nanos <= 0L) { in awaitDone()
397 LockSupport.parkNanos(this, nanos); in awaitDone()
DLinkedBlockingQueue.java344 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()
DScheduledThreadPoolExecutor.java1077 long nanos = unit.toNanos(timeout); in poll() local
1084 if (nanos <= 0) in poll()
1087 nanos = available.awaitNanos(nanos); in poll()
1092 if (nanos <= 0) in poll()
1095 if (nanos < delay || leader != null) in poll()
1096 nanos = available.awaitNanos(nanos); in poll()
1102 nanos -= delay - timeLeft; in poll()
DLinkedTransferQueue.java575 private E xfer(E e, boolean haveData, int how, long nanos) { in xfer() argument
615 return awaitMatch(s, pred, e, (how == TIMED), nanos); in xfer()
668 private E awaitMatch(Node s, Node pred, E e, boolean timed, long nanos) { in awaitMatch() argument
669 final long deadline = timed ? System.nanoTime() + nanos : 0L; in awaitMatch()
681 if ((w.isInterrupted() || (timed && nanos <= 0)) && in awaitMatch()
700 nanos = deadline - System.nanoTime(); in awaitMatch()
701 if (nanos > 0L) in awaitMatch()
702 LockSupport.parkNanos(this, nanos); in awaitMatch()
DArrayBlockingQueue.java342 long nanos = unit.toNanos(timeout); in offer() local
347 if (nanos <= 0) in offer()
349 nanos = notFull.awaitNanos(nanos); in offer()
381 long nanos = unit.toNanos(timeout); in poll() local
386 if (nanos <= 0) in poll()
388 nanos = notEmpty.awaitNanos(nanos); in poll()
DPriorityBlockingQueue.java518 long nanos = unit.toNanos(timeout); in poll() local
523 while ( (result = dequeue()) == null && nanos > 0) in poll()
524 nanos = notEmpty.awaitNanos(nanos); in poll()
DThreadPoolExecutor.java1422 long nanos = unit.toNanos(timeout); in awaitTermination() local
1429 if (nanos <= 0) in awaitTermination()
1431 nanos = termination.awaitNanos(nanos); in awaitTermination()
DForkJoinPool.java2993 long nanos = unit.toNanos(timeout); in awaitTermination() local
2996 if (nanos <= 0L) in awaitTermination()
2998 long deadline = System.nanoTime() + nanos; in awaitTermination()
3003 if (nanos <= 0L) in awaitTermination()
3005 long millis = TimeUnit.NANOSECONDS.toMillis(nanos); in awaitTermination()
3007 nanos = deadline - System.nanoTime(); in awaitTermination()
3024 long nanos = unit.toNanos(timeout); in awaitQuiescence() local
3039 if ((System.nanoTime() - startTime) > nanos) in awaitQuiescence()
/libcore/benchmarks/src/benchmarks/regression/
DCharacterBenchmark.java41 @Override public double nanosToUnits(double nanos) { in nanosToUnits() argument
42 return nanos / 65536; in nanosToUnits()
/libcore/benchmarks/libs/
Dcaliper.jarMETA-INF/ META-INF/MANIFEST.MF com/ com/google/ com/ ...