- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for t1 (0.36 sec)
-
okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt
} assertThat(log.take()).isEqualTo("runOnce delays.size=2") val t2 = System.nanoTime() / 1e6 - t1 assertThat(t2).isCloseTo(750.0, 250.0) assertThat(log.take()).isEqualTo("runOnce delays.size=1") val t3 = System.nanoTime() / 1e6 - t1 assertThat(t3).isCloseTo(1750.0, 250.0) } @Test fun taskFailsWithUncheckedException() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/LoggingInterceptors.java
response.body().close(); } private static class LoggingInterceptor implements Interceptor { @Override public Response intercept(Chain chain) throws IOException { long t1 = System.nanoTime(); Request request = chain.request(); logger.info(String.format("Sending request %s on %s%n%s", request.url(), chain.connection(), request.headers()));
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Jan 01 15:55:32 GMT 2016 - 2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DispatcherTest.kt
} chain.proceed(chain.request()) }, ) .build() val t1 = makeSynchronousCall(client.newCall(newRequest("http://a/3"))) ready.await(5, TimeUnit.SECONDS) executor.finishJob("http://a/2") assertThat(idle.get()).isFalse() proceed.countDown() t1.join() assertThat(idle.get()).isTrue() } @Test fun executionRejectedImmediately() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 12.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheTest.kt
assertThat((response1.receivedResponseAtMillis - t0).toDouble()).isCloseTo(0.0, 250.0) // A conditional cache hit updates the cache. Thread.sleep(500) // Make sure t0 and t1 are distinct. val t1 = System.currentTimeMillis() val response2 = get(server.url("/a")) assertThat(response2.code).isEqualTo(HttpURLConnection.HTTP_OK) assertThat(response2.body.string()).isEqualTo("A")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 108.6K bytes - Viewed (0) -
docs/features/interceptors.md
Request request = chain.request(); long t1 = System.nanoTime(); logger.info(String.format("Sending request %s on %s%n%s", request.url(), chain.connection(), request.headers())); Response response = chain.proceed(request); long t2 = System.nanoTime(); logger.info(String.format("Received response for %s in %.1fms%n%s", response.request().url(), (t2 - t1) / 1e6d, response.headers()));
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 8.1K bytes - Viewed (0)