Home
last modified time | relevance | path

Searched refs:remainingNanos (Results 1 – 13 of 13) sorted by relevance

/external/guava/android/guava/src/com/google/common/util/concurrent/
DUninterruptibles.java81 long remainingNanos = unit.toNanos(timeout); in awaitUninterruptibly() local
82 long end = System.nanoTime() + remainingNanos; in awaitUninterruptibly()
87 return latch.await(remainingNanos, NANOSECONDS); in awaitUninterruptibly()
90 remainingNanos = end - System.nanoTime(); in awaitUninterruptibly()
111 long remainingNanos = unit.toNanos(timeout); in awaitUninterruptibly() local
112 long end = System.nanoTime() + remainingNanos; in awaitUninterruptibly()
116 return condition.await(remainingNanos, NANOSECONDS); in awaitUninterruptibly()
119 remainingNanos = end - System.nanoTime(); in awaitUninterruptibly()
159 long remainingNanos = unit.toNanos(timeout); in joinUninterruptibly() local
160 long end = System.nanoTime() + remainingNanos; in joinUninterruptibly()
[all …]
DMonitor.java382 for (long remainingNanos = timeoutNanos; ; ) { in enter()
384 return lock.tryLock(remainingNanos, TimeUnit.NANOSECONDS); in enter()
387 remainingNanos = remainingNanos(startTime, timeoutNanos); in enter()
496 (startTime == 0L) ? timeoutNanos : remainingNanos(startTime, timeoutNanos), in enterWhen()
555 for (long remainingNanos = timeoutNanos; ; ) { in enterWhenUninterruptibly()
557 if (lock.tryLock(remainingNanos, TimeUnit.NANOSECONDS)) { in enterWhenUninterruptibly()
564 remainingNanos = remainingNanos(startTime, timeoutNanos); in enterWhenUninterruptibly()
576 final long remainingNanos; in enterWhenUninterruptibly() local
579 remainingNanos = timeoutNanos; in enterWhenUninterruptibly()
581 remainingNanos = remainingNanos(startTime, timeoutNanos); in enterWhenUninterruptibly()
[all …]
DAbstractFuture.java415 long remainingNanos = timeoutNanos; in get() local
424 final long endNanos = remainingNanos > 0 ? System.nanoTime() + remainingNanos : 0; in get()
426 if (remainingNanos >= SPIN_THRESHOLD_NANOS) { in get()
434 OverflowAvoidingLockSupport.parkNanos(this, remainingNanos); in get()
449 remainingNanos = endNanos - System.nanoTime(); in get()
450 if (remainingNanos < SPIN_THRESHOLD_NANOS) { in get()
466 while (remainingNanos > 0) { in get()
474 remainingNanos = endNanos - System.nanoTime(); in get()
481 if (remainingNanos + SPIN_THRESHOLD_NANOS < 0) { in get()
484 long overWaitNanos = -remainingNanos; in get()
/external/guava/guava/src/com/google/common/util/concurrent/
DUninterruptibles.java96 long remainingNanos = unit.toNanos(timeout); in awaitUninterruptibly() local
97 long end = System.nanoTime() + remainingNanos; in awaitUninterruptibly()
102 return latch.await(remainingNanos, NANOSECONDS); in awaitUninterruptibly()
105 remainingNanos = end - System.nanoTime(); in awaitUninterruptibly()
138 long remainingNanos = unit.toNanos(timeout); in awaitUninterruptibly() local
139 long end = System.nanoTime() + remainingNanos; in awaitUninterruptibly()
143 return condition.await(remainingNanos, NANOSECONDS); in awaitUninterruptibly()
146 remainingNanos = end - System.nanoTime(); in awaitUninterruptibly()
198 long remainingNanos = unit.toNanos(timeout); in joinUninterruptibly() local
199 long end = System.nanoTime() + remainingNanos; in joinUninterruptibly()
[all …]
DMonitor.java412 for (long remainingNanos = timeoutNanos; ; ) {
414 return lock.tryLock(remainingNanos, TimeUnit.NANOSECONDS);
417 remainingNanos = remainingNanos(startTime, timeoutNanos);
550 (startTime == 0L) ? timeoutNanos : remainingNanos(startTime, timeoutNanos),
620 for (long remainingNanos = timeoutNanos; ; ) {
622 if (lock.tryLock(remainingNanos, TimeUnit.NANOSECONDS)) {
629 remainingNanos = remainingNanos(startTime, timeoutNanos);
641 final long remainingNanos;
644 remainingNanos = timeoutNanos;
646 remainingNanos = remainingNanos(startTime, timeoutNanos);
[all …]
DAbstractFuture.java415 long remainingNanos = timeoutNanos; in get() local
424 final long endNanos = remainingNanos > 0 ? System.nanoTime() + remainingNanos : 0; in get()
426 if (remainingNanos >= SPIN_THRESHOLD_NANOS) { in get()
434 OverflowAvoidingLockSupport.parkNanos(this, remainingNanos); in get()
449 remainingNanos = endNanos - System.nanoTime(); in get()
450 if (remainingNanos < SPIN_THRESHOLD_NANOS) { in get()
466 while (remainingNanos > 0) { in get()
474 remainingNanos = endNanos - System.nanoTime(); in get()
481 if (remainingNanos + SPIN_THRESHOLD_NANOS < 0) { in get()
484 long overWaitNanos = -remainingNanos; in get()
/external/okhttp/okio/okio/src/main/java/okio/
DAsyncTimeout.java94 long remainingNanos = node.remainingNanos(now); in scheduleTimeout() local
96 if (prev.next == null || remainingNanos < prev.next.remainingNanos(now)) { in scheduleTimeout()
133 private long remainingNanos(long now) { in remainingNanos() method in AsyncTimeout
315 long waitNanos = node.remainingNanos(System.nanoTime());
/external/okio/okio/src/jvmMain/kotlin/okio/
DAsyncTimeout.kt66 private fun remainingNanos(now: Long) = timeoutAt - now in remainingNanos() method in okio.AsyncTimeout
248 val remainingNanos = node.remainingNanos(now) in scheduleTimeout() constant
251 if (prev.next == null || remainingNanos < prev.next!!.remainingNanos(now)) { in scheduleTimeout()
310 var waitNanos = node.remainingNanos(System.nanoTime()) in awaitTimeout()
/external/okhttp/repackaged/okio/okio/src/main/java/com/android/okhttp/okio/
DAsyncTimeout.java96 long remainingNanos = node.remainingNanos(now); in scheduleTimeout() local
98 if (prev.next == null || remainingNanos < prev.next.remainingNanos(now)) { in scheduleTimeout()
135 private long remainingNanos(long now) { in remainingNanos() method in AsyncTimeout
317 long waitNanos = node.remainingNanos(System.nanoTime());
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DInterruptionUtil.java119 long remainingNanos = unit.toNanos(timeout); in joinUninterruptibly() local
120 long end = System.nanoTime() + remainingNanos; in joinUninterruptibly()
125 NANOSECONDS.timedJoin(thread, remainingNanos); in joinUninterruptibly()
129 remainingNanos = end - System.nanoTime(); in joinUninterruptibly()
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/
DInterruptionUtil.java119 long remainingNanos = unit.toNanos(timeout); in joinUninterruptibly() local
120 long end = System.nanoTime() + remainingNanos; in joinUninterruptibly()
125 NANOSECONDS.timedJoin(thread, remainingNanos); in joinUninterruptibly()
129 remainingNanos = end - System.nanoTime(); in joinUninterruptibly()
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DClientCallImpl.java326 private final long remainingNanos; field in ClientCallImpl.DeadlineTimer
328 DeadlineTimer(long remainingNanos) { in DeadlineTimer() argument
329 this.remainingNanos = remainingNanos; in DeadlineTimer()
337 String.format("deadline exceeded after %dns", remainingNanos))); in run()
342 long remainingNanos = deadline.timeRemaining(TimeUnit.NANOSECONDS); in startDeadlineTimer() local
345 new DeadlineTimer(remainingNanos)), remainingNanos, TimeUnit.NANOSECONDS); in startDeadlineTimer()
/external/caliper/caliper/src/test/java/com/google/caliper/runner/
DRuntimeInstrumentTest.java179 long remainingNanos = TimeUnit.MILLISECONDS.toNanos(10); in spin() local
182 while ((elapsed = System.nanoTime() - start) < remainingNanos) {} in spin()