/external/junit/src/main/java/org/junit/runners/model/ |
TestTimedOutException.java | 3 import java.util.concurrent.TimeUnit; 15 private final TimeUnit timeUnit; 19 * Creates exception with a standard message "test timed out after [timeout] [timeUnit]" 22 * @param timeUnit the time unit for the timeout value 24 public TestTimedOutException(long timeout, TimeUnit timeUnit) { 26 timeout, timeUnit.name().toLowerCase())); 27 this.timeUnit = timeUnit; [all...] |
/external/junit/src/main/java/org/junit/rules/ |
Timeout.java | 7 import java.util.concurrent.TimeUnit; 42 private final TimeUnit timeUnit; 59 * Instead use {@link #Timeout(long, java.util.concurrent.TimeUnit)}, 67 this(millis, TimeUnit.MILLISECONDS); 72 * at the timeUnit of granularity of the provided {@code TimeUnit}. 76 * @param timeUnit the time unit for the {@code timeout} 79 public Timeout(long timeout, TimeUnit timeUnit) { [all...] |
/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);
|
/cts/tests/sensor/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);
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/ |
AsyncUtils.java | 21 import static java.util.concurrent.TimeUnit.MILLISECONDS; 27 import java.util.concurrent.TimeUnit; 39 public static <T> T await(Future<T> f, long time, TimeUnit timeUnit) { 41 return f.get(time, timeUnit); 51 public static Throwable awaitFailure(Future<?> f, long time, TimeUnit timeUnit) { 52 return assertThrows(() -> await(f, time, timeUnit)); 60 Future<T> f, long time, TimeUnit timeUnit) { [all...] |
/external/icu/android_icu4j/src/main/java/android/icu/text/ |
TimeUnitFormat.java | 27 import android.icu.util.TimeUnit; 42 * TimeUnit timeUnit = TimeUnit.SECOND; 44 * TimeUnitAmount source = new TimeUnitAmount(2, timeUnit); 95 private transient Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns; 253 TimeUnit resultTimeUnit = null; 261 for (TimeUnit timeUnit : timeUnitToCountToPatterns.keySet()) { 262 Map<String, Object[]> countToPattern = timeUnitToCountToPatterns.get(timeUnit); [all...] |
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/ |
TimeUnitFormat.java | 26 import com.ibm.icu.util.TimeUnit; 41 * TimeUnit timeUnit = TimeUnit.SECOND; 43 * TimeUnitAmount source = new TimeUnitAmount(2, timeUnit); 93 private transient Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns; 251 TimeUnit resultTimeUnit = null; 259 for (TimeUnit timeUnit : timeUnitToCountToPatterns.keySet()) { 260 Map<String, Object[]> countToPattern = timeUnitToCountToPatterns.get(timeUnit); [all...] |
/external/grpc-grpc-java/testing/src/main/java/io/grpc/testing/ |
GrpcCleanupRule.java | 31 import java.util.concurrent.TimeUnit; 51 private long timeoutNanos = TimeUnit.SECONDS.toNanos(10L); 66 public GrpcCleanupRule setTimeout(long timeout, TimeUnit timeUnit) { 68 timeoutNanos = timeUnit.toNanos(timeout); 166 timeoutNanos - stopwatch.elapsed(TimeUnit.NANOSECONDS), TimeUnit.NANOSECONDS); 196 boolean awaitReleased(long duration, TimeUnit timeUnit) throws InterruptedException; 217 public boolean awaitReleased(long duration, TimeUnit timeUnit) throws InterruptedException [all...] |
/external/grpc-grpc-java/netty/src/main/java/io/grpc/netty/ |
NettyServerBuilder.java | 47 import java.util.concurrent.TimeUnit; 64 private static final long MIN_KEEPALIVE_TIME_NANO = TimeUnit.MILLISECONDS.toNanos(1L); 65 private static final long MIN_KEEPALIVE_TIMEOUT_NANO = TimeUnit.MICROSECONDS.toNanos(499L); 66 private static final long MIN_MAX_CONNECTION_IDLE_NANO = TimeUnit.SECONDS.toNanos(1L); 67 private static final long MIN_MAX_CONNECTION_AGE_NANO = TimeUnit.SECONDS.toNanos(1L); 68 private static final long AS_LARGE_AS_INFINITE = TimeUnit.DAYS.toNanos(1000L); 90 private long permitKeepAliveTimeInNanos = TimeUnit.MINUTES.toNanos(5); 298 public NettyServerBuilder keepAliveTime(long keepAliveTime, TimeUnit timeUnit) { 300 keepAliveTimeInNanos = timeUnit.toNanos(keepAliveTime) [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)
|
/external/junit/src/main/java/org/junit/internal/runners/statements/ |
FailOnTimeout.java | 7 import java.util.concurrent.TimeUnit; 15 private final TimeUnit timeUnit; 36 this(builder().withTimeout(timeoutMillis, TimeUnit.MILLISECONDS), statement); 42 timeUnit = builder.unit; 52 private TimeUnit unit = TimeUnit.SECONDS; 70 public Builder withTimeout(long timeout, TimeUnit unit) { 75 throw new NullPointerException("TimeUnit cannot be null"); 118 return task.get(timeout, timeUnit); [all...] |
/external/setupcompat/main/java/com/google/android/setupcompat/internal/ |
SetupCompatServiceProvider.java | 32 import java.util.concurrent.TimeUnit; 53 public static ISetupCompatService get(Context context, long waitTime, @NonNull TimeUnit timeUnit) 55 return getInstance(context).getService(waitTime, timeUnit); 59 public ISetupCompatService getService(long timeout, TimeUnit timeUnit) 76 return waitForConnection(timeout, timeUnit); 80 return waitForConnection(timeout, timeUnit); 89 private ISetupCompatService waitForConnection(long timeout, TimeUnit timeUnit) [all...] |
/external/grpc-grpc-java/testing/src/main/java/io/grpc/internal/testing/ |
TestStreamTracer.java | 23 import java.util.concurrent.TimeUnit; 42 boolean await(long timeout, TimeUnit timeUnit) throws InterruptedException; 106 public boolean await(long timeout, TimeUnit timeUnit) throws InterruptedException { 107 return streamClosed.await(timeout, timeUnit);
|
TestServerStreamTracer.java | 21 import java.util.concurrent.TimeUnit; 38 public boolean await(long timeout, TimeUnit timeUnit) throws InterruptedException { 39 return delegate.await(timeout, timeUnit);
|
/external/grpc-grpc-java/core/src/main/java/io/grpc/ |
ForwardingChannelBuilder.java | 22 import java.util.concurrent.TimeUnit; 149 public T idleTimeout(long value, TimeUnit unit) { 161 public T keepAliveTime(long keepAliveTime, TimeUnit timeUnit) { 162 delegate().keepAliveTime(keepAliveTime, timeUnit); 167 public T keepAliveTimeout(long keepAliveTimeout, TimeUnit timeUnit) { 168 delegate().keepAliveTimeout(keepAliveTimeout, timeUnit);
|
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/ |
ShadowUsageStatsManager.java | 28 import java.util.concurrent.TimeUnit; 52 * String[], long, TimeUnit, PendingIntent)}. 58 private final TimeUnit timeUnit; 65 @NonNull TimeUnit timeUnit, 70 this.timeUnit = timeUnit; 88 public TimeUnit getTimeUnit() { 89 return timeUnit; [all...] |
/external/grpc-grpc-java/context/src/test/java/io/grpc/testing/ |
DeadlineSubject.java | 22 import static java.util.concurrent.TimeUnit.NANOSECONDS; 29 import java.util.concurrent.TimeUnit; 53 public TolerantDeadlineComparison isWithin(final long delta, final TimeUnit timeUnit) { 63 BigInteger deltaNanos = BigInteger.valueOf(timeUnit.toNanos(delta));
|
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/ |
Rescheduler.java | 24 import java.util.concurrent.TimeUnit; 55 void reschedule(long delay, TimeUnit timeUnit) { 56 long delayNanos = timeUnit.toNanos(delay); 63 wakeUp = scheduler.schedule(new FutureRunnable(), delayNanos, TimeUnit.NANOSECONDS); 99 new FutureRunnable(), runAtNanos - now, TimeUnit.NANOSECONDS); 114 return stopwatch.elapsed(TimeUnit.NANOSECONDS);
|
/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/okhttp/repackaged/okhttp/src/main/java/com/android/okhttp/ |
CacheControl.java | 5 import java.util.concurrent.TimeUnit; 32 .maxStale(Integer.MAX_VALUE, TimeUnit.SECONDS) 302 * {@link TimeUnit#SECONDS} precision; finer precision will be lost. 304 public Builder maxAge(int maxAge, TimeUnit timeUnit) { 306 long maxAgeSecondsLong = timeUnit.toSeconds(maxAge); 319 * with {@link TimeUnit#SECONDS} precision; finer precision will be 322 public Builder maxStale(int maxStale, TimeUnit timeUnit) { 324 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...] |