Home
last modified time | relevance | path

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

/external/guava/android/guava/src/com/google/common/util/concurrent/
DUninterruptibles.java77 long remainingNanos = unit.toNanos(timeout); in awaitUninterruptibly() local
78 long end = System.nanoTime() + remainingNanos; in awaitUninterruptibly()
83 return latch.await(remainingNanos, NANOSECONDS); in awaitUninterruptibly()
86 remainingNanos = end - System.nanoTime(); in awaitUninterruptibly()
107 long remainingNanos = unit.toNanos(timeout); in awaitUninterruptibly() local
108 long end = System.nanoTime() + remainingNanos; in awaitUninterruptibly()
112 return condition.await(remainingNanos, NANOSECONDS); in awaitUninterruptibly()
115 remainingNanos = end - System.nanoTime(); in awaitUninterruptibly()
155 long remainingNanos = unit.toNanos(timeout); in joinUninterruptibly() local
156 long end = System.nanoTime() + remainingNanos; in joinUninterruptibly()
[all …]
DMonitor.java381 for (long remainingNanos = timeoutNanos; ; ) { in enter()
383 return lock.tryLock(remainingNanos, TimeUnit.NANOSECONDS); in enter()
386 remainingNanos = remainingNanos(startTime, timeoutNanos); in enter()
495 (startTime == 0L) ? timeoutNanos : remainingNanos(startTime, timeoutNanos), in enterWhen()
554 for (long remainingNanos = timeoutNanos; ; ) { in enterWhenUninterruptibly()
556 if (lock.tryLock(remainingNanos, TimeUnit.NANOSECONDS)) { in enterWhenUninterruptibly()
563 remainingNanos = remainingNanos(startTime, timeoutNanos); in enterWhenUninterruptibly()
575 final long remainingNanos; in enterWhenUninterruptibly() local
578 remainingNanos = timeoutNanos; in enterWhenUninterruptibly()
580 remainingNanos = remainingNanos(startTime, timeoutNanos); in enterWhenUninterruptibly()
[all …]
DAbstractFuture.java401 long remainingNanos = timeoutNanos; in get() local
410 final long endNanos = remainingNanos > 0 ? System.nanoTime() + remainingNanos : 0; in get()
412 if (remainingNanos >= SPIN_THRESHOLD_NANOS) { in get()
420 LockSupport.parkNanos(this, remainingNanos); in get()
435 remainingNanos = endNanos - System.nanoTime(); in get()
436 if (remainingNanos < SPIN_THRESHOLD_NANOS) { in get()
452 while (remainingNanos > 0) { in get()
460 remainingNanos = endNanos - System.nanoTime(); in get()
467 if (remainingNanos + SPIN_THRESHOLD_NANOS < 0) { in get()
470 long overWaitNanos = -remainingNanos; in get()
/external/guava/guava/src/com/google/common/util/concurrent/
DUninterruptibles.java77 long remainingNanos = unit.toNanos(timeout); in awaitUninterruptibly() local
78 long end = System.nanoTime() + remainingNanos; in awaitUninterruptibly()
83 return latch.await(remainingNanos, NANOSECONDS); in awaitUninterruptibly()
86 remainingNanos = end - System.nanoTime(); in awaitUninterruptibly()
107 long remainingNanos = unit.toNanos(timeout); in awaitUninterruptibly() local
108 long end = System.nanoTime() + remainingNanos; in awaitUninterruptibly()
112 return condition.await(remainingNanos, NANOSECONDS); in awaitUninterruptibly()
115 remainingNanos = end - System.nanoTime(); in awaitUninterruptibly()
155 long remainingNanos = unit.toNanos(timeout); in joinUninterruptibly() local
156 long end = System.nanoTime() + remainingNanos; in joinUninterruptibly()
[all …]
DMonitor.java399 for (long remainingNanos = timeoutNanos; ; ) {
401 return lock.tryLock(remainingNanos, TimeUnit.NANOSECONDS);
404 remainingNanos = remainingNanos(startTime, timeoutNanos);
513 (startTime == 0L) ? timeoutNanos : remainingNanos(startTime, timeoutNanos),
572 for (long remainingNanos = timeoutNanos; ; ) {
574 if (lock.tryLock(remainingNanos, TimeUnit.NANOSECONDS)) {
581 remainingNanos = remainingNanos(startTime, timeoutNanos);
593 final long remainingNanos;
596 remainingNanos = timeoutNanos;
598 remainingNanos = remainingNanos(startTime, timeoutNanos);
[all …]
DAbstractFuture.java401 long remainingNanos = timeoutNanos; in get() local
410 final long endNanos = remainingNanos > 0 ? System.nanoTime() + remainingNanos : 0; in get()
412 if (remainingNanos >= SPIN_THRESHOLD_NANOS) { in get()
420 LockSupport.parkNanos(this, remainingNanos); in get()
435 remainingNanos = endNanos - System.nanoTime(); in get()
436 if (remainingNanos < SPIN_THRESHOLD_NANOS) { in get()
452 while (remainingNanos > 0) { in get()
460 remainingNanos = endNanos - System.nanoTime(); in get()
467 if (remainingNanos + SPIN_THRESHOLD_NANOS < 0) { in get()
470 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/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()