/external/guava/guava-testlib/src/com/google/common/testing/ |
FakeTicker.java | 38 private final AtomicLong nanos = new AtomicLong(); field in class:FakeTicker 47 nanos.addAndGet(nanoseconds); 52 return nanos.get();
|
/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);
|
/external/jmonkeyengine/engine/src/test/jme3test/app/ |
TestTempVars.java | 45 long milliseconds, nanos; local 52 // long nanos = System.nanoTime(); 56 // long milliseconds = (System.nanoTime() - nanos) / NANOS_TO_MS; 61 nanos = System.nanoTime(); 65 milliseconds = (System.nanoTime() - nanos) / NANOS_TO_MS; 70 nanos = System.nanoTime(); 74 milliseconds = (System.nanoTime() - nanos) / NANOS_TO_MS; 78 nanos = System.nanoTime(); 82 milliseconds = (System.nanoTime() - nanos) / NANOS_TO_MS;
|
/external/guava/guava/src/com/google/common/base/ |
Stopwatch.java | 186 long nanos = elapsedNanos(); local 188 TimeUnit unit = chooseUnit(nanos); 189 double value = (double) nanos / NANOSECONDS.convert(1, unit); 196 private static TimeUnit chooseUnit(long nanos) { 197 if (SECONDS.convert(nanos, NANOSECONDS) > 0) { 200 if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) { 203 if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) {
|
Suppliers.java | 168 long nanos = expirationNanos; local 170 if (nanos == 0 || now - nanos >= 0) { 172 if (nanos == expirationNanos) { // recheck for lost race 175 nanos = now + durationNanos; 176 // In the very unlikely event that nanos is 0, set it to 1; 178 expirationNanos = (nanos == 0) ? 1 : nanos;
|
/external/guava/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/ |
Stopwatch.java | 168 private static TimeUnit chooseUnit(long nanos) { 169 if (SECONDS.convert(nanos, NANOSECONDS) > 0) { 172 if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) { 175 if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) {
|
/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 | 162 private int dowait(boolean timed, long nanos) 199 else if (nanos > 0L) 200 nanos = trip.awaitNanos(nanos); 219 if (timed && nanos <= 0L) {
|
AbstractExecutorService.java | 111 boolean timed, long nanos) 151 f = ecs.poll(nanos, TimeUnit.NANOSECONDS); 155 nanos -= now - lastTime; 234 long nanos = unit.toNanos(timeout); local 249 nanos -= now - lastTime; 251 if (nanos <= 0) 257 if (nanos <= 0) 260 f.get(nanos, TimeUnit.NANOSECONDS); 267 nanos -= now - lastTime;
|
DelayQueue.java | 217 long nanos = unit.toNanos(timeout); local 224 if (nanos <= 0) 227 nanos = available.awaitNanos(nanos); 232 if (nanos <= 0) 234 if (nanos < delay || leader != null) 235 nanos = available.awaitNanos(nanos); 241 nanos -= delay - timeLeft;
|
SynchronousQueue.java | 145 * @param nanos the timeout, in nanoseconds 151 abstract Object transfer(Object e, boolean timed, long nanos); 286 Object transfer(Object e, boolean timed, long nanos) { 314 if (timed && nanos <= 0) { // can't wait 320 SNode m = awaitFulfill(s, timed, nanos); 368 * @param nanos timeout value 371 SNode awaitFulfill(SNode s, boolean timed, long nanos) { 407 nanos -= now - lastTime; 409 if (nanos <= 0) { 420 else if (nanos > spinForTimeoutThreshold [all...] |
LinkedBlockingDeque.java | 378 long nanos = unit.toNanos(timeout); local 383 if (nanos <= 0) 385 nanos = notFull.awaitNanos(nanos); 401 long nanos = unit.toNanos(timeout); local 406 if (nanos <= 0) 408 nanos = notFull.awaitNanos(nanos); 482 long nanos = unit.toNanos(timeout); local 488 if (nanos <= 0 500 long nanos = unit.toNanos(timeout); local [all...] |
Exchanger.java | 305 * @param nanos if timed, the maximum wait time 308 private Object doExchange(Object item, boolean timed, long nanos) { 330 awaitNanos(me, slot, nanos) : 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 | 314 long nanos = unit.toNanos(timeout); local 319 if (nanos <= 0) 321 nanos = notFull.awaitNanos(nanos); 353 long nanos = unit.toNanos(timeout); local 358 if (nanos <= 0) 360 nanos = notEmpty.awaitNanos(nanos);
|
LinkedBlockingQueue.java | 346 long nanos = unit.toNanos(timeout); local 353 if (nanos <= 0) 355 nanos = notFull.awaitNanos(nanos); 430 long nanos = unit.toNanos(timeout); local 436 if (nanos <= 0) 438 nanos = notEmpty.awaitNanos(nanos);
|
ScheduledThreadPoolExecutor.java | 1079 long nanos = unit.toNanos(timeout); local [all...] |
/external/llvm/include/llvm/Support/ |
TimeValue.h | 86 /// \p nanos argument defaults to zero for convenience. 88 explicit TimeValue (SecondsType seconds, NanoSecondsType nanos = 0) 89 : seconds_( seconds ), nanos_( nanos ) { this->normalize(); } 266 void getTimespecTime( uint64_t& seconds, uint32_t& nanos ) const { 268 nanos = nanos_; 289 /// The nanoseconds component of the TimeValue is set to \p nanos without 295 void nanoseconds ( NanoSecondsType nanos ) { 296 this->nanos_ = nanos;
|
/libcore/luni/src/main/java/java/lang/ |
Object.java | 424 * @param nanos 428 * if {@code millis < 0}, {@code nanos < 0} or {@code nanos > 441 public final native void wait(long millis, int nanos) throws InterruptedException;
|
Thread.java | 787 * @param nanos Extra nanosecond precision 793 public final void join(long millis, int nanos) throws InterruptedException { 794 if (millis < 0 || nanos < 0 || nanos >= NANOS_PER_MILLI) { 799 boolean overflow = millis >= (Long.MAX_VALUE - nanos) / NANOS_PER_MILLI; 800 boolean forever = (millis | nanos) == 0; 817 long nanosToWait = millis * NANOS_PER_MILLI + nanos; 822 t.wait(millis, nanos); 832 nanos = (int) (nanosRemaining - millis * NANOS_PER_MILLI); [all...] |
/external/guava/guava/src/com/google/common/util/concurrent/ |
AbstractListeningExecutorService.java | 63 private <T> T doInvokeAny(Collection<? extends Callable<T>> tasks, boolean timed, long nanos) 98 f = ecs.poll(nanos, TimeUnit.NANOSECONDS); 103 nanos -= now - lastTime; 186 long nanos = unit.toNanos(timeout); local 202 nanos -= now - lastTime; 204 if (nanos <= 0) { 211 if (nanos <= 0) { 215 f.get(nanos, TimeUnit.NANOSECONDS); 222 nanos -= now - lastTime;
|
MoreExecutors.java | 299 long nanos = unit.toNanos(timeout); local 305 } else if (nanos <= 0) { 308 nanos = termination.awaitNanos(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/guava-tests/test/com/google/common/util/concurrent/ |
SimpleTimeLimiterTest.java | 175 long nanos = System.nanoTime() - startNanos; local 176 assertTrue(nanos >= atLeastMillis * 1000000); 177 assertTrue(nanos <= atMostMillis * 1000000);
|
/dalvik/vm/ |
Sync.h | 89 s8 timeout, s4 nanos, bool interruptShouldThrow);
|
/external/eclipse-windowbuilder/propertysheet/src/org/eclipse/wb/internal/core/utils/execution/ |
ExecutionUtils.java | 59 long nanos = millis * 1000000L; local 66 } while (System.nanoTime() - start < nanos);
|