/external/guava/guava-tests/test/com/google/common/cache/ |
D | CacheExpirationTest.java | 21 import static java.util.concurrent.TimeUnit.MILLISECONDS; 54 .expireAfterWrite(EXPIRING_TIME, MILLISECONDS) in testExpiration_expireAfterWrite() 66 .expireAfterAccess(EXPIRING_TIME, MILLISECONDS) in testExpiration_expireAfterAccess() 103 .expireAfterWrite(EXPIRING_TIME, MILLISECONDS) in testExpiringGet_expireAfterWrite() 115 .expireAfterAccess(EXPIRING_TIME, MILLISECONDS) in testExpiringGet_expireAfterAccess() 136 ticker.advance(EXPIRING_TIME * 10, MILLISECONDS); in runExpirationTest() 197 .expireAfterWrite(10, MILLISECONDS) in testRemovalListener_expireAfterWrite() 204 ticker.advance(1, MILLISECONDS); in testRemovalListener_expireAfterWrite() 217 .expireAfterWrite(EXPIRING_TIME, MILLISECONDS) in testRemovalScheduler_expireAfterWrite() 229 .expireAfterAccess(EXPIRING_TIME, MILLISECONDS) in testRemovalScheduler_expireAfterAccess() [all …]
|
D | CacheBuilderGwtTest.java | 138 .expireAfterAccess(1000, TimeUnit.MILLISECONDS) in testExpireAfterAccess() 145 fakeTicker.advance(999, TimeUnit.MILLISECONDS); in testExpireAfterAccess() 147 fakeTicker.advance(1, TimeUnit.MILLISECONDS); in testExpireAfterAccess() 149 fakeTicker.advance(1000, TimeUnit.MILLISECONDS); in testExpireAfterAccess() 155 .expireAfterWrite(1000, TimeUnit.MILLISECONDS) in testExpireAfterWrite() 163 fakeTicker.advance(999, TimeUnit.MILLISECONDS); in testExpireAfterWrite() 168 fakeTicker.advance(2, TimeUnit.MILLISECONDS); in testExpireAfterWrite() 176 fakeTicker.advance(1000, TimeUnit.MILLISECONDS); in testExpireAfterWrite() 182 .expireAfterWrite(1000, TimeUnit.MILLISECONDS) in testExpireAfterWriteAndAccess() 183 .expireAfterAccess(500, TimeUnit.MILLISECONDS) in testExpireAfterWriteAndAccess() [all …]
|
D | CacheRefreshTest.java | 18 import static java.util.concurrent.TimeUnit.MILLISECONDS; 35 .refreshAfterWrite(3, MILLISECONDS) in testAutoRefresh() 36 .expireAfterWrite(6, MILLISECONDS) in testAutoRefresh() 47 ticker.advance(1, MILLISECONDS); in testAutoRefresh() 57 ticker.advance(1, MILLISECONDS); in testAutoRefresh() 67 ticker.advance(1, MILLISECONDS); in testAutoRefresh() 75 ticker.advance(1, MILLISECONDS); in testAutoRefresh() 83 ticker.advance(1, MILLISECONDS); in testAutoRefresh() 91 ticker.advance(1, MILLISECONDS); in testAutoRefresh()
|
/external/grpc-grpc-java/testing/src/main/java/io/grpc/internal/testing/ |
D | AbstractTransportTest.java | 204 assertTrue(serverListener.waitForShutdown(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in tearDown() 245 = serverListener.takeListenerOrFail(TIMEOUT_MS, TimeUnit.MILLISECONDS); in frameAfterRstStreamShouldNotBreakClientChannel() 256 = serverTransportListener.takeStreamOrFail(TIMEOUT_MS, TimeUnit.MILLISECONDS); in frameAfterRstStreamShouldNotBreakClientChannel() 268 Status.CANCELLED, clientStreamListener.status.get(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in frameAfterRstStreamShouldNotBreakClientChannel() 269 assertNotNull(clientStreamListener.trailers.get(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in frameAfterRstStreamShouldNotBreakClientChannel() 278 = serverTransportListener.takeStreamOrFail(TIMEOUT_MS, TimeUnit.MILLISECONDS); in frameAfterRstStreamShouldNotBreakClientChannel() 291 assertTrue(serverListener.waitForShutdown(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in serverNotListening() 327 = serverListener.takeListenerOrFail(TIMEOUT_MS, TimeUnit.MILLISECONDS); in clientStartAndStopOnceConnected() 332 assertTrue(serverTransportListener.waitForTermination(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in clientStartAndStopOnceConnected() 334 assertTrue(serverListener.waitForShutdown(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in clientStartAndStopOnceConnected() [all …]
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
D | SimpleTimeLimiterTest.java | 43 TimeUnit.MILLISECONDS.sleep(DELAY_MS); in someGoodStaticMethod() 49 TimeUnit.MILLISECONDS.sleep(DELAY_MS); in someBadStaticMethod() 66 }, ENOUGH_MS, TimeUnit.MILLISECONDS, true); in testGoodCallableWithEnoughTime() 80 }, NOT_ENOUGH_MS, TimeUnit.MILLISECONDS, true); in testGoodCallableWithNotEnoughTime() 96 }, ENOUGH_MS, TimeUnit.MILLISECONDS, true); in testBadCallableWithEnoughTime() 112 }, NOT_ENOUGH_MS, TimeUnit.MILLISECONDS, true); in testBadCallableWithNotEnoughTime() 122 target, Sample.class, ENOUGH_MS, TimeUnit.MILLISECONDS); in testGoodMethodWithEnoughTime() 132 target, Sample.class, NOT_ENOUGH_MS, TimeUnit.MILLISECONDS); in testGoodMethodWithNotEnoughTime() 143 TimeUnit.MILLISECONDS.sleep(ENOUGH_MS); in testGoodMethodWithNotEnoughTime() 150 target, Sample.class, ENOUGH_MS, TimeUnit.MILLISECONDS); in testBadMethodWithEnoughTime() [all …]
|
D | RateLimiterTest.java | 21 import static java.util.concurrent.TimeUnit.MILLISECONDS; 178 RateLimiter limiter = RateLimiter.create(stopwatch, 2.0, 4000, MILLISECONDS); in testWarmUp() 203 RateLimiter limiter = RateLimiter.create(stopwatch, 2.0, 4000, MILLISECONDS); in testWarmUpAndUpdate() 260 assertTrue(limiter.tryAcquire(200, MILLISECONDS)); in testTryAcquire_someWaitAllowed() 261 assertFalse(limiter.tryAcquire(100, MILLISECONDS)); in testTryAcquire_someWaitAllowed() 263 assertTrue(limiter.tryAcquire(100, MILLISECONDS)); in testTryAcquire_someWaitAllowed() 405 stopwatch, qps, warmupMillis, MILLISECONDS); in testTimeToWarmUpIsHonouredEvenWithWeights() 449 sleepMicros("U", MILLISECONDS.toMicros(millis)); in sleepMillis()
|
/external/okhttp/okio/okio/src/test/java/okio/ |
D | AsyncTimeoutTest.java | 44 a.timeout( 250, TimeUnit.MILLISECONDS); in setUp() 45 b.timeout( 500, TimeUnit.MILLISECONDS); in setUp() 46 c.timeout( 750, TimeUnit.MILLISECONDS); in setUp() 47 d.timeout(1000, TimeUnit.MILLISECONDS); in setUp() 52 timeout.timeout(0, TimeUnit.MILLISECONDS); in zeroTimeoutIsNoTimeout() 136 timeout.deadline(250, TimeUnit.MILLISECONDS); in deadlineOnly() 145 timeout.deadline(250, TimeUnit.MILLISECONDS); in deadlineBeforeTimeout() 146 timeout.timeout(750, TimeUnit.MILLISECONDS); in deadlineBeforeTimeout() 155 timeout.timeout(250, TimeUnit.MILLISECONDS); in deadlineAfterTimeout() 156 timeout.deadline(750, TimeUnit.MILLISECONDS); in deadlineAfterTimeout() [all …]
|
D | SocketTimeoutTest.java | 41 source.timeout().timeout(5000, TimeUnit.MILLISECONDS); in readWithoutTimeout() 49 source.timeout().timeout(250, TimeUnit.MILLISECONDS); in readWithTimeout() 61 sink.timeout().timeout(500, TimeUnit.MILLISECONDS); in writeWithoutTimeout() 71 sink.timeout().timeout(500, TimeUnit.MILLISECONDS); in writeWithTimeout()
|
/external/guava/guava-gwt/test-super/com/google/common/base/super/com/google/common/base/ |
D | StopwatchTest.java | 20 import static java.util.concurrent.TimeUnit.MILLISECONDS; 165 assertEquals(0, stopwatch.elapsed(MILLISECONDS)); in testElapsed_millis() 167 assertEquals(1, stopwatch.elapsed(MILLISECONDS)); in testElapsed_millis() 173 assertEquals(0, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis() 175 assertEquals(1, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis() 181 assertEquals(0, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis_whileRunning() 184 assertEquals(345, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis_whileRunning() 193 assertEquals(4, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis_notRunning() 204 assertEquals(9, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis_multipleSegments() 206 assertEquals(34, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis_multipleSegments() [all …]
|
/external/guava/guava-tests/test/com/google/common/base/ |
D | StopwatchTest.java | 20 import static java.util.concurrent.TimeUnit.MILLISECONDS; 166 assertEquals(0, stopwatch.elapsed(MILLISECONDS)); in testElapsed_millis() 168 assertEquals(1, stopwatch.elapsed(MILLISECONDS)); in testElapsed_millis() 174 assertEquals(0, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis() 176 assertEquals(1, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis() 182 assertEquals(0, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis_whileRunning() 185 assertEquals(345, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis_whileRunning() 194 assertEquals(4, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis_notRunning() 205 assertEquals(9, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis_multipleSegments() 207 assertEquals(34, stopwatch.elapsed(MILLISECONDS)); in testElapsedMillis_multipleSegments() [all …]
|
/external/guava/guava-testlib/src/com/google/common/util/concurrent/testing/ |
D | AbstractListenableFutureTest.java | 115 future.get(20, TimeUnit.MILLISECONDS); in testTimeoutOnGetWorksCorrectly() 158 assertTrue(successLatch.await(200, TimeUnit.MILLISECONDS)); in testCanceledFutureThrowsCancellation() 194 assertTrue(successLatch.await(200, TimeUnit.MILLISECONDS)); in testListenersNotifiedOnError() 195 assertTrue(listenerLatch.await(200, TimeUnit.MILLISECONDS)); in testListenersNotifiedOnError() 200 exec.awaitTermination(100, TimeUnit.MILLISECONDS); in testListenersNotifiedOnError() 241 listenerLatch.await(500, TimeUnit.MILLISECONDS); in testAllListenersCompleteSuccessfully() 244 exec.awaitTermination(500, TimeUnit.MILLISECONDS); in testAllListenersCompleteSuccessfully()
|
/external/guava/guava-tests/test/com/google/common/collect/ |
D | QueuesTest.java | 109 assertEquals(0, Queues.drain(q, ImmutableList.of(), 1, 10, TimeUnit.MILLISECONDS)); in testDrainTimesOut() 117 int drained = drain(q, Lists.newArrayList(), 2, 10, TimeUnit.MILLISECONDS, interruptibly); in testDrainTimesOut() 120 assertTrue((System.nanoTime() - startTime) >= TimeUnit.MILLISECONDS.toNanos(10)); in testDrainTimesOut() 139 assertEquals(0, drain(q, ImmutableList.of(), 0, 10, TimeUnit.MILLISECONDS, interruptibly)); in testZeroElements() 245 assertEquals(0, Queues.drain(q, ImmutableList.of(), 0, 10, TimeUnit.MILLISECONDS)); in assertInterruptibleDrained() 264 Queues.drainUninterruptibly(q, ImmutableList.of(), 0, 10, TimeUnit.MILLISECONDS)); in assertUninterruptibleDrained() 271 q, Lists.newArrayList(), 1, 10, TimeUnit.MILLISECONDS); in assertUninterruptibleDrained() 272 assertTrue((System.nanoTime() - startTime) >= TimeUnit.MILLISECONDS.toNanos(10)); in assertUninterruptibleDrained() 296 Uninterruptibles.sleepUninterruptibly(Long.MAX_VALUE, TimeUnit.MILLISECONDS); in run()
|
/external/opencensus-java/exporters/trace/jaeger/src/test/java/io/opencensus/exporter/trace/jaeger/ |
D | JaegerExporterHandlerIntegrationTest.java | 23 import static java.util.concurrent.TimeUnit.MILLISECONDS; 163 .isAtLeast(MILLISECONDS.toMicros(startTimeInMillis)); in exportToJaeger() 164 assertThat(span.get("startTime").getAsLong()).isAtMost(MILLISECONDS.toMicros(endTimeInMillis)); in exportToJaeger() 166 .isAtLeast(MILLISECONDS.toMicros(spanDurationInMillis)); in exportToJaeger() 169 MILLISECONDS.toMicros(spanDurationInMillis + timeWaitingForSpansToBeExportedInMillis)); in exportToJaeger() 183 assertThat(ts1).isAtLeast(MILLISECONDS.toMicros(startTimeInMillis)); in exportToJaeger() 184 assertThat(ts1).isAtMost(MILLISECONDS.toMicros(endTimeInMillis)); in exportToJaeger() 194 assertThat(ts2).isAtLeast(MILLISECONDS.toMicros(startTimeInMillis)); in exportToJaeger() 195 assertThat(ts2).isAtMost(MILLISECONDS.toMicros(endTimeInMillis)); in exportToJaeger()
|
/external/grpc-grpc-java/grpclb/src/test/java/io/grpc/grpclb/ |
D | CachedSubchannelPoolTest.java | 21 import static java.util.concurrent.TimeUnit.MILLISECONDS; 122 clock.forwardTime(SHUTDOWN_TIMEOUT_MS - 1, MILLISECONDS); in subchannelExpireAfterReturned() 128 clock.forwardTime(1, MILLISECONDS); in subchannelExpireAfterReturned() 132 clock.forwardTime(SHUTDOWN_TIMEOUT_MS - 1, MILLISECONDS); in subchannelExpireAfterReturned() 153 clock.forwardTime(SHUTDOWN_TIMEOUT_MS - 1, MILLISECONDS); in subchannelReused() 162 clock.forwardTime(SHUTDOWN_TIMEOUT_MS - 1, MILLISECONDS); in subchannelReused() 164 clock.forwardTime(1, MILLISECONDS); in subchannelReused() 174 clock.forwardTime(SHUTDOWN_TIMEOUT_MS - 1, MILLISECONDS); in subchannelReused() 176 clock.forwardTime(1, MILLISECONDS); in subchannelReused()
|
/external/opencensus-java/api/src/main/java/io/opencensus/trace/export/ |
D | SampledSpanStore.java | 255 MICROSx100_MILLIx1(TimeUnit.MICROSECONDS.toNanos(100), TimeUnit.MILLISECONDS.toNanos(1)), 262 MILLIx1_MILLIx10(TimeUnit.MILLISECONDS.toNanos(1), TimeUnit.MILLISECONDS.toNanos(10)), 269 MILLIx10_MILLIx100(TimeUnit.MILLISECONDS.toNanos(10), TimeUnit.MILLISECONDS.toNanos(100)), 276 MILLIx100_SECONDx1(TimeUnit.MILLISECONDS.toNanos(100), TimeUnit.SECONDS.toNanos(1)),
|
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/ |
D | RetryPolicyTest.java | 87 TimeUnit.MILLISECONDS.toNanos(2100), in getRetryPolicies() 88 TimeUnit.MILLISECONDS.toNanos(2200), in getRetryPolicies() 97 TimeUnit.MILLISECONDS.toNanos(100), in getRetryPolicies() 98 TimeUnit.MILLISECONDS.toNanos(1000), in getRetryPolicies() 112 TimeUnit.MILLISECONDS.toNanos(100), in getRetryPolicies() 113 TimeUnit.MILLISECONDS.toNanos(1000), in getRetryPolicies()
|
/external/guava/guava-gwt/src-super/com/google/common/base/super/com/google/common/base/ |
D | Stopwatch.java | 24 import static java.util.concurrent.TimeUnit.MILLISECONDS; 223 if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 224 return MILLISECONDS; in chooseUnit() 238 case MILLISECONDS: in abbreviate()
|
/external/guava/guava/src/com/google/common/base/ |
D | Stopwatch.java | 24 import static java.util.concurrent.TimeUnit.MILLISECONDS; 238 if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) { in chooseUnit() 239 return MILLISECONDS; in chooseUnit() 253 case MILLISECONDS: in abbreviate()
|
/external/caliper/caliper/src/test/java/com/google/caliper/worker/ |
D | RuntimeWorkerTest.java | 20 import static java.util.concurrent.TimeUnit.MILLISECONDS; 38 private static final ShortDuration TIMING_INTERVAL = ShortDuration.of(100, MILLISECONDS); 56 long targetReps = calculateTargetReps(INITIAL_REPS, MILLISECONDS.toNanos(100), in testCalculateTargetReps_applyRandomness()
|
/external/grpc-grpc-java/interop-testing/src/test/java/io/grpc/testing/integration/ |
D | MoreInProcessTest.java | 71 assertTrue(inProcessChannel.awaitTermination(900, TimeUnit.MILLISECONDS)); in tearDown() 72 assertTrue(inProcessServer.awaitTermination(900, TimeUnit.MILLISECONDS)); in tearDown() 130 assertTrue(finishLatch.await(900, TimeUnit.MILLISECONDS)); in asyncClientStreaming_serverResponsePriorToRequest() 189 assertTrue(finishLatch.await(900, TimeUnit.MILLISECONDS)); in asyncClientStreaming_serverErrorPriorToRequest() 249 assertTrue(finishLatch.await(900, TimeUnit.MILLISECONDS)); in asyncClientStreaming_erroneousServiceImpl()
|
/external/mockito/src/test/java/org/mockitousage/verification/ |
D | VerificationWithAfterTest.java | 23 import static java.util.concurrent.TimeUnit.MILLISECONDS; 218 watch.assertElapsedTimeIsLessThan(2000, MILLISECONDS); in should_fail_early_when_at_most_is_used() 236 watch.assertElapsedTimeIsLessThan(2000, MILLISECONDS); in should_fail_early_when_never_is_used() 256 watch.assertElapsedTimeIsLessThan(2000, MILLISECONDS); in should_fail_early_when_only_is_used() 276 watch.assertElapsedTimeIsLessThan(2000, MILLISECONDS); in should_fail_early_when_time_x_is_used()
|
/external/drrickorang/LoopbackApp/app/src/main/java/org/drrickorang/loopback/ |
D | CaptureHolder.java | 117 long hours = TimeUnit.MILLISECONDS.toHours(timeFromTestStartMS); in captureState() 118 long minutes = TimeUnit.MILLISECONDS.toMinutes(timeFromTestStartMS) - in captureState() 119 TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(timeFromTestStartMS)); in captureState() 120 long seconds = TimeUnit.MILLISECONDS.toSeconds(timeFromTestStartMS) - in captureState() 121 TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(timeFromTestStartMS)); in captureState()
|
/external/okhttp/repackaged/android/src/main/java/com/android/okhttp/ |
D | HttpHandler.java | 85 client.setConnectTimeout(0, TimeUnit.MILLISECONDS); in createHttpOkUrlFactory() 86 client.setReadTimeout(0, TimeUnit.MILLISECONDS); in createHttpOkUrlFactory() 87 client.setWriteTimeout(0, TimeUnit.MILLISECONDS); in createHttpOkUrlFactory()
|
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/ |
D | RuntimeEnvironmentTest.java | 4 import static java.util.concurrent.TimeUnit.MILLISECONDS; 42 if (!finished.await(1000, MILLISECONDS)) { in isMainThread_forNewThread_withoutSwitch() 62 if (!finished.await(1000, MILLISECONDS)) { in isMainThread_forNewThread_withSwitch()
|
/external/okhttp/android/src/main/java/com/squareup/okhttp/ |
D | HttpHandler.java | 81 client.setConnectTimeout(0, TimeUnit.MILLISECONDS); in createHttpOkUrlFactory() 82 client.setReadTimeout(0, TimeUnit.MILLISECONDS); in createHttpOkUrlFactory() 83 client.setWriteTimeout(0, TimeUnit.MILLISECONDS); in createHttpOkUrlFactory()
|