HomeSort by relevance Sort by last modified time
    Searched refs:nanos (Results 1 - 25 of 56) sorted by null

1 2 3

  /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);
316 * @param nanos the maximum number of nanoseconds to wait
318 public static void parkNanos(long nanos) {
319 if (nanos > 0)
320 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 165 private int dowait(boolean timed, long nanos)
202 else if (nanos > 0L)
203 nanos = trip.awaitNanos(nanos);
222 if (timed && nanos <= 0L) {
AbstractExecutorService.java 111 boolean timed, long nanos)
132 final long deadline = timed ? System.nanoTime() + nanos : 0L;
151 f = ecs.poll(nanos, TimeUnit.NANOSECONDS);
154 nanos = deadline - System.nanoTime();
233 long nanos = unit.toNanos(timeout); local
240 final long deadline = System.nanoTime() + nanos;
247 nanos = deadline - System.nanoTime();
248 if (nanos <= 0L)
255 if (nanos <= 0L)
258 f.get(nanos, TimeUnit.NANOSECONDS)
    [all...]
DelayQueue.java 220 long nanos = unit.toNanos(timeout); local
227 if (nanos <= 0)
230 nanos = available.awaitNanos(nanos);
235 if (nanos <= 0)
238 if (nanos < delay || leader != null)
239 nanos = available.awaitNanos(nanos);
245 nanos -= delay - timeLeft;
SynchronousQueue.java 145 * @param nanos the timeout, in nanoseconds
151 abstract E transfer(E e, boolean timed, long nanos);
297 E transfer(E e, boolean timed, long nanos) {
325 if (timed && nanos <= 0) { // can't wait
331 SNode m = awaitFulfill(s, timed, nanos);
379 * @param nanos timeout value
382 SNode awaitFulfill(SNode s, boolean timed, long nanos) {
405 final long deadline = timed ? System.nanoTime() + nanos : 0L;
416 nanos = deadline - System.nanoTime();
417 if (nanos <= 0L)
    [all...]
Phaser.java 760 long nanos = unit.toNanos(timeout); local
767 QNode node = new QNode(this, phase, true, true, nanos);
1067 long nanos; field in class:Phaser.QNode
    [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...]
FutureTask.java 364 * @param nanos time to wait, if timed
367 private int awaitDone(boolean timed, long nanos)
369 final long deadline = timed ? System.nanoTime() + nanos : 0L;
392 nanos = deadline - System.nanoTime();
393 if (nanos <= 0L) {
397 LockSupport.parkNanos(this, nanos);
LinkedBlockingQueue.java 344 long nanos = unit.toNanos(timeout); local
351 if (nanos <= 0)
353 nanos = notFull.awaitNanos(nanos);
427 long nanos = unit.toNanos(timeout); local
433 if (nanos <= 0)
435 nanos = notEmpty.awaitNanos(nanos);
  /libcore/libart/src/main/java/java/lang/
Thread.java 749 * @param nanos Extra nanosecond precision
755 public final void join(long millis, int nanos) throws InterruptedException {
756 if (millis < 0 || nanos < 0 || nanos >= NANOS_PER_MILLI) {
757 throw new IllegalArgumentException("bad timeout: millis=" + millis + ",nanos=" + nanos);
761 boolean overflow = millis >= (Long.MAX_VALUE - nanos) / NANOS_PER_MILLI;
762 boolean forever = (millis | nanos) == 0;
774 long nanosToWait = millis * NANOS_PER_MILLI + nanos;
779 lock.wait(millis, nanos);
    [all...]
Object.java 434 * @param nanos
438 * if {@code millis < 0}, {@code nanos < 0} or {@code nanos >
451 public final native void wait(long millis, int nanos) throws InterruptedException;
  /external/llvm/include/llvm/Support/
TimeValue.h 89 /// \p nanos argument defaults to zero for convenience.
91 explicit TimeValue (SecondsType seconds, NanoSecondsType nanos = 0)
92 : seconds_( seconds ), nanos_( nanos ) { this->normalize(); }
267 void getTimespecTime( uint64_t& seconds, uint32_t& nanos ) const {
269 nanos = nanos_;
290 /// The nanoseconds component of the TimeValue is set to \p nanos without
296 void nanoseconds ( NanoSecondsType nanos ) {
297 this->nanos_ = nanos;
  /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/libdvm/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 774 * @param nanos Extra nanosecond precision
780 public final void join(long millis, int nanos) throws InterruptedException {
781 if (millis < 0 || nanos < 0 || nanos >= NANOS_PER_MILLI) {
782 throw new IllegalArgumentException("bad timeout: millis=" + millis + ",nanos=" + nanos);
786 boolean overflow = millis >= (Long.MAX_VALUE - nanos) / NANOS_PER_MILLI;
787 boolean forever = (millis | nanos) == 0;
804 long nanosToWait = millis * NANOS_PER_MILLI + nanos;
809 t.wait(millis, nanos);
    [all...]
  /libcore/luni/src/main/java/java/sql/
Timestamp.java 50 private int nanos; field in class:Timestamp
88 nanos = theNano;
275 return nanos;
289 theTime = theTime + (nanos / 1000000);
306 nanos = n;
368 if (nanos == 0) {
371 format(nanos, 9, sb);
482 * 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);

Completed in 1131 milliseconds

1 2 3