/external/guava/guava-testlib/src/com/google/common/testing/ |
FakeTicker.java | 25 import java.util.concurrent.TimeUnit; 46 /** Advances the ticker value by {@code time} in {@code timeUnit}. */ 47 public FakeTicker advance(long time, TimeUnit timeUnit) { 48 return advance(timeUnit.toNanos(time)); 63 public FakeTicker setAutoIncrementStep(long autoIncrementStep, TimeUnit timeUnit) { 65 this.autoIncrementStepNanos = timeUnit.toNanos(autoIncrementStep);
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/ |
Duration.java | 30 public TimeUnit timeUnit; 32 public enum TimeUnit { 39 TimeUnit(int value) { 51 public Duration(int timeInterval, TimeUnit timeUnit) { 53 this.timeUnit = timeUnit; 58 timeUnit = TimeUnit.values()[in.readInt()] [all...] |
ValueParser.java | 20 import com.android.internal.telephony.cat.Duration.TimeUnit; 89 TimeUnit timeUnit = TimeUnit.SECOND; 95 timeUnit = TimeUnit.values()[(rawValue[valueIndex] & 0xff)]; 100 return new Duration(timeInterval, timeUnit);
|
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/sensoroperations/ |
FakeSensorOperation.java | 24 import java.util.concurrent.TimeUnit; 35 private final TimeUnit mTimeUnit; 40 public FakeSensorOperation(long delay, TimeUnit timeUnit) { 41 this(false, delay, timeUnit); 47 public FakeSensorOperation(boolean fail, long delay, TimeUnit timeUnit) { 48 if (timeUnit == null) { 53 mTimeUnit = timeUnit; 61 long delayNs = TimeUnit.NANOSECONDS.convert(mDelay, mTimeUnit) [all...] |
DelaySensorOperation.java | 22 import java.util.concurrent.TimeUnit; 31 private final TimeUnit mTimeUnit; 38 * @param timeUnit the unit of the delay 40 public DelaySensorOperation(SensorOperation operation, long delay, TimeUnit timeUnit) { 44 mTimeUnit = timeUnit;
|
AlarmOperation.java | 29 import java.util.concurrent.TimeUnit; 50 private final TimeUnit mTimeUnit; 61 * @param timeUnit the unit of the duration 67 TimeUnit timeUnit) { 72 mTimeUnit = timeUnit; 92 + TimeUnit.MILLISECONDS.convert(mSleepDuration, mTimeUnit));
|
ParallelSensorOperation.java | 32 import java.util.concurrent.TimeUnit; 45 private final TimeUnit mTimeUnit; 59 public ParallelSensorOperation(long timeout, TimeUnit timeUnit) { 60 if (timeUnit == null) { 64 mTimeUnit = timeUnit; 90 TimeUnit.SECONDS, 111 + TimeUnit.NANOSECONDS.convert(mTimeout, mTimeUnit); 171 return future.get(waitTimeNs, TimeUnit.NANOSECONDS);
|
TestSensorOperation.java | 23 import java.util.concurrent.TimeUnit; 262 SensorCtsHelper.sleep(2, TimeUnit.SECONDS); 306 SensorCtsHelper.sleep(2, TimeUnit.SECONDS); 332 * @param timeUnit The time unit for {@code duration}. 337 final TimeUnit timeUnit) { 344 listener.waitForEvents(duration, timeUnit); 359 * @param timeUnit The time unit for {@code duration}. 364 final TimeUnit timeUnit) { [all...] |
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/ |
TimeUnitFormat.java | 24 import com.ibm.icu.util.TimeUnit; 39 * TimeUnit timeUnit = TimeUnit.SECOND; 41 * TimeUnitAmount source = new TimeUnitAmount(2, timeUnit); 98 private transient Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns; 262 TimeUnit resultTimeUnit = null; 270 for (TimeUnit timeUnit : timeUnitToCountToPatterns.keySet()) { 271 Map<String, Object[]> countToPattern = timeUnitToCountToPatterns.get(timeUnit); [all...] |
/external/guava/guava-gwt/test-super/com/google/common/testing/super/com/google/common/testing/ |
FakeTickerTest.java | 24 import java.util.concurrent.TimeUnit; 39 ticker.advance(1, TimeUnit.MILLISECONDS); 45 assertSame(ticker, ticker.setAutoIncrementStep(10, TimeUnit.NANOSECONDS)); 49 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); 56 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(1, TimeUnit.MILLISECONDS); 63 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(3, TimeUnit.SECONDS); 70 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); 75 for (TimeUnit timeUnit : EnumSet.allOf(TimeUnit.class)) [all...] |
/external/apache-http/src/org/apache/http/conn/ |
ClientConnectionManager.java | 35 import java.util.concurrent.TimeUnit; 91 * @param timeUnit the unit of time validDuration is measured in 95 void releaseConnection(ManagedClientConnection conn, long validDuration, TimeUnit timeUnit) 113 void closeIdleConnections(long idletime, TimeUnit tunit)
|
/packages/apps/Stk/src/com/android/stk/ |
StkApp.java | 54 switch (duration.timeUnit) {
|
/external/robolectric/src/main/java/com/xtremelabs/robolectric/util/ |
RobolectricBackgroundExecutorService.java | 12 import java.util.concurrent.TimeUnit; 37 public boolean awaitTermination(long l, TimeUnit timeUnit) throws InterruptedException { 73 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> callables, long l, TimeUnit timeUnit) throws InterruptedException { 83 public <T> T invokeAny(Collection<? extends Callable<T>> callables, long l, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException {
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
MainThreadExecutor.java | 24 import java.util.concurrent.TimeUnit; 77 public boolean awaitTermination(long l, TimeUnit timeUnit) throws InterruptedException {
|
/packages/apps/Camera2/src/com/android/camera/one/v2/autofocus/ |
AETriggerResult.java | 30 import java.util.concurrent.TimeUnit; 107 public boolean get(long timeout, TimeUnit timeUnit) throws InterruptedException, 110 return mFutureResult.get(timeout, timeUnit);
|
AFTriggerResult.java | 30 import java.util.concurrent.TimeUnit; 104 public boolean get(long timeout, TimeUnit timeUnit) throws InterruptedException, 107 return mFutureResult.get(timeout, timeUnit);
|
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/ |
CacheControl.java | 4 import java.util.concurrent.TimeUnit; 30 .maxStale(Integer.MAX_VALUE, TimeUnit.SECONDS) 299 * {@link TimeUnit#SECONDS} precision; finer precision will be lost. 301 public Builder maxAge(int maxAge, TimeUnit timeUnit) { 303 long maxAgeSecondsLong = timeUnit.toSeconds(maxAge); 316 * with {@link TimeUnit#SECONDS} precision; finer precision will be 319 public Builder maxStale(int maxStale, TimeUnit timeUnit) { 321 long maxStaleSecondsLong = timeUnit.toSeconds(maxStale) [all...] |
/external/guava/guava/src/com/google/common/util/concurrent/ |
MoreExecutors.java | 50 import java.util.concurrent.TimeUnit; 80 * @param timeUnit unit of time for the time parameter 85 ThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) { 87 .getExitingExecutorService(executor, terminationTimeout, timeUnit); 103 * @param timeUnit unit of time for the time parameter 108 ScheduledThreadPoolExecutor executor, long terminationTimeout, TimeUnit timeUnit) { 110 .getExitingScheduledExecutorService(executor, terminationTimeout, timeUnit); 122 * @param timeUnit unit of time for the time paramete [all...] |
/external/guava/guava-testlib/test/com/google/common/testing/ |
FakeTickerTest.java | 29 import java.util.concurrent.TimeUnit; 50 ticker.advance(1, TimeUnit.MILLISECONDS); 56 assertSame(ticker, ticker.setAutoIncrementStep(10, TimeUnit.NANOSECONDS)); 60 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); 67 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(1, TimeUnit.MILLISECONDS); 74 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(3, TimeUnit.SECONDS); 81 FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, TimeUnit.NANOSECONDS); 86 for (TimeUnit timeUnit : EnumSet.allOf(TimeUnit.class)) [all...] |
/external/glide/library/src/main/java/com/bumptech/glide/load/engine/executor/ |
FifoPriorityThreadPoolExecutor.java | 8 import java.util.concurrent.TimeUnit; 27 this(poolSize, poolSize, 0, TimeUnit.MILLISECONDS, new DefaultThreadFactory()); 30 public FifoPriorityThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAlive, TimeUnit timeUnit, 32 super(corePoolSize, maximumPoolSize, keepAlive, timeUnit, new PriorityBlockingQueue<Runnable>(), threadFactory);
|
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/ |
Util.java | 38 import java.util.concurrent.TimeUnit; 156 public static boolean discard(Source source, int timeout, TimeUnit timeUnit) { 158 return skipAll(source, timeout, timeUnit); 168 public static boolean skipAll(Source source, int duration, TimeUnit timeUnit) throws IOException { 173 source.timeout().deadlineNanoTime(now + Math.min(originalDuration, timeUnit.toNanos(duration)));
|
/cts/tests/tests/hardware/src/android/hardware/cts/helpers/ |
SensorCtsHelper.java | 25 import java.util.concurrent.TimeUnit; 121 public static <TValue extends Number> double getFrequency(TValue period, TimeUnit unit) { 122 return 1000000000 / (TimeUnit.NANOSECONDS.convert(1, unit) * period.doubleValue()); 128 public static <TValue extends Number> double getPeriod(TValue frequency, TimeUnit unit) { 129 return 1000000000 / (TimeUnit.NANOSECONDS.convert(1, unit) * frequency.doubleValue()); 147 public static void sleep(long duration, TimeUnit timeUnit) throws InterruptedException { 148 long durationNs = TimeUnit.NANOSECONDS.convert(duration, timeUnit);
|
/external/apache-http/src/org/apache/http/impl/conn/tsccm/ |
ThreadSafeClientConnManager.java | 35 import java.util.concurrent.TimeUnit; 170 long timeout, TimeUnit tunit) throws InterruptedException, 203 public void releaseConnection(ManagedClientConnection conn, long validDuration, TimeUnit timeUnit) { 253 connectionPool.freeEntry(entry, reusable, validDuration, timeUnit); 297 public void closeIdleConnections(long idleTimeout, TimeUnit tunit) {
|
/external/glide/library/src/main/java/com/bumptech/glide/request/ |
RequestFutureTarget.java | 12 import java.util.concurrent.TimeUnit; 120 public R get(long time, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException { 121 return doGet(timeUnit.toMillis(time));
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
TimeUnitTest.java | 20 import com.ibm.icu.util.TimeUnit; 41 assertEquals("Test10219", expected[i], tuf.format(new TimeUnitAmount(1.588, TimeUnit.MINUTE))); 69 final TimeUnit[] values = TimeUnit.values(); 71 final TimeUnit timeUnit = values[j]; 74 TimeUnitAmount source = new TimeUnitAmount(tests[i], timeUnit); 126 assertEquals("", "1 hr", tufClone.format(new TimeUnitAmount(1, TimeUnit.HOUR))); 152 final TimeUnit[] units = new TimeUnit[]{ [all...] |