/external/guava/guava/src/com/google/common/base/ |
Stopwatch.java | 26 import static java.util.concurrent.TimeUnit.NANOSECONDS; 36 * An object that measures elapsed time in nanoseconds. It is useful to measure 202 * it is generally not useful to specify {@link TimeUnit#NANOSECONDS} 208 return desiredUnit.convert(elapsedNanos(), NANOSECONDS); 219 double value = (double) nanos / NANOSECONDS.convert(1, unit); 226 if (DAYS.convert(nanos, NANOSECONDS) > 0) { 229 if (HOURS.convert(nanos, NANOSECONDS) > 0) { 232 if (MINUTES.convert(nanos, NANOSECONDS) > 0) { 235 if (SECONDS.convert(nanos, NANOSECONDS) > 0) { 238 if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) [all...] |
/external/guava/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/ |
Stopwatch.java | 26 import static java.util.concurrent.TimeUnit.NANOSECONDS; 35 * An object that measures elapsed time in nanoseconds. It is useful to measure 201 * it is generally not useful to specify {@link TimeUnit#NANOSECONDS} 207 return desiredUnit.convert(elapsedNanos(), NANOSECONDS); 211 if (DAYS.convert(nanos, NANOSECONDS) > 0) { 214 if (HOURS.convert(nanos, NANOSECONDS) > 0) { 217 if (MINUTES.convert(nanos, NANOSECONDS) > 0) { 220 if (SECONDS.convert(nanos, NANOSECONDS) > 0) { 223 if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) { 226 if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) [all...] |
/external/caliper/caliper/src/test/java/com/google/caliper/worker/ |
RuntimeWorkerTest.java | 21 import static java.util.concurrent.TimeUnit.NANOSECONDS; 44 oneCycle.times(INITIAL_REPS).to(NANOSECONDS), TIMING_INTERVAL.to(NANOSECONDS), 0.0); 51 calculateTargetReps(INITIAL_REPS, HOURS.toNanos(1), TIMING_INTERVAL.to(NANOSECONDS), 0.0); 57 TIMING_INTERVAL.to(NANOSECONDS), 0.5);
|
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/ |
SensorCtsHelperTest.java | 44 assertEquals(10000000.0, SensorCtsHelper.getFrequency(100, TimeUnit.NANOSECONDS), 0.001); 45 assertEquals(1000000000.0, SensorCtsHelper.getFrequency(1, TimeUnit.NANOSECONDS), 0.001); 60 assertEquals(100, SensorCtsHelper.getPeriod(10000000, TimeUnit.NANOSECONDS), 0.001); 61 assertEquals(1, SensorCtsHelper.getPeriod(1000000000, TimeUnit.NANOSECONDS), 0.001);
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
TimeUnitTest.java | 16 import static java.util.concurrent.TimeUnit.NANOSECONDS; 56 SECONDS.convert(1000000000L*t, NANOSECONDS)); 71 MILLISECONDS.convert(1000000L*t, NANOSECONDS)); 86 MICROSECONDS.convert(1000L*t, NANOSECONDS)); 89 NANOSECONDS.convert(t, DAYS)); 91 NANOSECONDS.convert(t, HOURS)); 93 NANOSECONDS.convert(t, MINUTES)); 95 NANOSECONDS.convert(t, SECONDS)); 97 NANOSECONDS.convert(t, MILLISECONDS)); 99 NANOSECONDS.convert(t, MICROSECONDS)) [all...] |
/external/guava/guava-gwt/test-super/com/google/common/base/super/com/google/common/base/ |
StopwatchTest.java | 21 import static java.util.concurrent.TimeUnit.NANOSECONDS; 47 assertEquals(0, unstartedStopwatch.elapsed(NANOSECONDS)); 52 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); 101 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); 104 assertEquals(3, stopwatch.elapsed(NANOSECONDS)); 110 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); 112 assertEquals(2, stopwatch.elapsed(NANOSECONDS)); 116 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); 122 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); 125 assertEquals(345, stopwatch.elapsed(NANOSECONDS)); [all...] |
/external/guava/guava-tests/test/com/google/common/base/ |
StopwatchTest.java | 21 import static java.util.concurrent.TimeUnit.NANOSECONDS; 48 assertEquals(0, unstartedStopwatch.elapsed(NANOSECONDS)); 53 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); 102 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); 105 assertEquals(3, stopwatch.elapsed(NANOSECONDS)); 111 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); 113 assertEquals(2, stopwatch.elapsed(NANOSECONDS)); 117 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); 123 assertEquals(0, stopwatch.elapsed(NANOSECONDS)); 126 assertEquals(345, stopwatch.elapsed(NANOSECONDS)); [all...] |
/frameworks/base/tools/layoutlib/create/src/com/android/tools/layoutlib/java/ |
System_Delegate.java | 58 return TimeUnit.NANOSECONDS.toMillis(mNanosTime.get()); 66 return TimeUnit.NANOSECONDS.toMillis(mBootNanosTime.get());
|
/external/guava/guava-gwt/test-super/com/google/common/testing/super/com/google/common/testing/ |
FakeTickerTest.java | 45 assertSame(ticker, ticker.setAutoIncrementStep(10, TimeUnit.NANOSECONDS)); 49 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); 70 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); 86 ticker.setAutoIncrementStep(-1, TimeUnit.NANOSECONDS);
|
/external/guava/guava/src/com/google/common/util/concurrent/ |
Uninterruptibles.java | 19 import static java.util.concurrent.TimeUnit.NANOSECONDS; 85 return latch.await(remainingNanos, NANOSECONDS); 173 return future.get(remainingNanos, NANOSECONDS); 201 NANOSECONDS.timedJoin(toJoin, remainingNanos); 275 NANOSECONDS.sleep(remainingNanos); 316 return semaphore.tryAcquire(permits, remainingNanos, NANOSECONDS);
|
/external/guava/guava-tests/benchmark/com/google/common/base/ |
StopwatchBenchmark.java | 37 total += s.elapsed(TimeUnit.NANOSECONDS);
|
/external/caliper/caliper/src/main/java/com/google/caliper/runner/ |
NanoTimeGranularityTester.java | 20 import static java.util.concurrent.TimeUnit.NANOSECONDS; 56 return ShortDuration.of(LongMath.divide(total, TRIALS * 8, CEILING), NANOSECONDS);
|
TrialRunLoop.java | 18 import static java.util.concurrent.TimeUnit.NANOSECONDS; 94 timeLimitNanos - trialStopwatch.elapsed(NANOSECONDS), 95 NANOSECONDS); 125 timeLimitNanos = trialStopwatch.elapsed(NANOSECONDS) + cleanupTimeNanos; 197 return timeLimit.to(NANOSECONDS);
|
/external/guava/guava-gwt/test-super/com/google/common/cache/super/com/google/common/cache/ |
CacheBuilderTest.java | 23 import static java.util.concurrent.TimeUnit.NANOSECONDS; 120 .expireAfterWrite(1, NANOSECONDS) 145 .expireAfterAccess(1, NANOSECONDS) 162 .expireAfterWrite(1, NANOSECONDS) 163 .expireAfterAccess(1, NANOSECONDS)
|
/external/guava/guava-testlib/test/com/google/common/testing/ |
FakeTickerTest.java | 56 assertSame(ticker, ticker.setAutoIncrementStep(10, TimeUnit.NANOSECONDS)); 60 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); 81 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); 97 ticker.setAutoIncrementStep(-1, TimeUnit.NANOSECONDS); 113 // adds two nanoseconds to the ticker 129 new FakeTicker().setAutoIncrementStep(incrementByNanos, TimeUnit.NANOSECONDS);
|
/external/caliper/caliper/src/test/java/com/google/caliper/util/ |
ShortDurationTest.java | 35 testIt(0, "0nanoseconds", "0s"); 58 assertEquals(i, d.to(TimeUnit.NANOSECONDS));
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
InterruptionUtil.java | 21 import static java.util.concurrent.TimeUnit.NANOSECONDS; 129 NANOSECONDS.timedJoin(thread, remainingNanos);
|
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/ |
RecordingCallback.java | 52 long timeoutMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) + TIMEOUT_MILLIS; 62 long nowMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime());
|
/libcore/luni/src/main/java/java/util/concurrent/ |
ScheduledThreadPoolExecutor.java | 10 import static java.util.concurrent.TimeUnit.NANOSECONDS; 162 * Period for repeating tasks, in nanoseconds. 212 return unit.convert(time - System.nanoTime(), NANOSECONDS); 230 long diff = getDelay(NANOSECONDS) - other.getDelay(NANOSECONDS); 513 long headDelay = head.getDelay(NANOSECONDS); 625 schedule(command, 0, NANOSECONDS); 635 return schedule(task, 0, NANOSECONDS); 643 return schedule(Executors.callable(task, result), 0, NANOSECONDS); 651 return schedule(task, 0, NANOSECONDS); [all...] |
DelayQueue.java | 9 import static java.util.concurrent.TimeUnit.NANOSECONDS; 30 * {@code getDelay(TimeUnit.NANOSECONDS)} method returns a value less 165 return (first == null || first.getDelay(NANOSECONDS) > 0) 189 long delay = first.getDelay(NANOSECONDS); 237 long delay = first.getDelay(NANOSECONDS); 302 return (first == null || first.getDelay(NANOSECONDS) > 0) ?
|
/libcore/luni/src/test/java/libcore/java/lang/ref/ |
ReferenceQueueTest.java | 59 long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos); 81 long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos); 91 long durationMillis = TimeUnit.NANOSECONDS.toMillis(durationNanos);
|
/external/guava/guava-tests/test/com/google/common/collect/ |
QueuesTest.java | 94 int elements = drain(q, buf, 100, Long.MAX_VALUE, TimeUnit.NANOSECONDS, interruptibly); 163 int elements = Queues.drain(q, buf, -1, Long.MAX_VALUE, TimeUnit.NANOSECONDS); 169 Queues.drain(q, buf, 1, Long.MAX_VALUE, TimeUnit.NANOSECONDS); 181 Queues.drain(q, ImmutableList.of(), 100, Long.MAX_VALUE, TimeUnit.NANOSECONDS); 204 Queues.drainUninterruptibly(q, buf, 100, Long.MAX_VALUE, TimeUnit.NANOSECONDS); 254 Queues.drain(q, Lists.newArrayList(), 1, Long.MAX_VALUE, TimeUnit.NANOSECONDS);
|
/external/caliper/caliper/src/main/java/com/google/caliper/worker/ |
MacrobenchmarkWorker.java | 20 import static java.util.concurrent.TimeUnit.NANOSECONDS; 70 long nanos = stopwatch.stop().elapsed(NANOSECONDS);
|
/external/guava/guava-testlib/src/com/google/common/util/concurrent/testing/ |
TestingExecutors.java | 162 return Longs.compare(getDelay(TimeUnit.NANOSECONDS), other.getDelay(TimeUnit.NANOSECONDS));
|
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensoroperations/ |
FakeSensorOperation.java | 61 long delayNs = TimeUnit.NANOSECONDS.convert(mDelay, mTimeUnit);
|