Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 215 for TimeUnit (0.08 sec)

  1. okhttp/src/main/kotlin/okhttp3/ConnectionPool.kt

      constructor(
        maxIdleConnections: Int = 5,
        keepAliveDuration: Long = 5,
        timeUnit: TimeUnit = TimeUnit.MINUTES,
        connectionListener: ConnectionListener = ConnectionListener.NONE,
      ) : this(
        taskRunner = TaskRunner.INSTANCE,
        maxIdleConnections = maxIdleConnections,
        keepAliveDuration = keepAliveDuration,
        timeUnit = timeUnit,
        connectionListener = connectionListener,
      )
    
      // Public API
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 03 20:39:41 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/AutobahnTester.kt

            ) {
              t.printStackTrace(System.out)
              latch.countDown()
            }
          },
        )
    
        check(latch.await(30, TimeUnit.SECONDS)) { "Timed out waiting for test $number to finish." }
        val endNanos = System.nanoTime()
        val tookMs = TimeUnit.NANOSECONDS.toMillis(endNanos - startNanos.get())
        println("Took ${tookMs}ms")
      }
    
      private fun getTestCount(): Long {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java

        assertEquals(0, ticker.read());
        assertEquals(10, ticker.read());
        assertEquals(20, ticker.read());
    
        for (TimeUnit timeUnit : TimeUnit.values()) {
          ticker.setAutoIncrementStep(0, timeUnit);
          assertEquals(
              "Expected no auto-increment when setting autoIncrementStep to 0 " + timeUnit,
              30,
              ticker.read());
        }
      }
    
      public void testAutoIncrement_negative() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 22 13:49:09 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  4. guava/src/com/google/common/base/Stopwatch.java

    import static java.util.concurrent.TimeUnit.DAYS;
    import static java.util.concurrent.TimeUnit.HOURS;
    import static java.util.concurrent.TimeUnit.MICROSECONDS;
    import static java.util.concurrent.TimeUnit.MILLISECONDS;
    import static java.util.concurrent.TimeUnit.MINUTES;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    import static java.util.concurrent.TimeUnit.SECONDS;
    
    import com.google.common.annotations.GwtCompatible;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  5. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

        result = cachedDns.lookup("google.com")
        assertThat(server.takeRequest(0, TimeUnit.MILLISECONDS)).isNull()
        assertThat(result).isEqualTo(listOf(address("157.240.1.18")))
    
        result = cachedDns.lookup("www.google.com")
        assertThat(result).containsExactly(address("157.240.1.18"))
        recordedRequest = server.takeRequest(0, TimeUnit.MILLISECONDS)!!
        assertThat(recordedRequest.method).isEqualTo("POST")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 11K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/InterceptorTest.kt

    import java.util.concurrent.BlockingQueue
    import java.util.concurrent.LinkedBlockingQueue
    import java.util.concurrent.SynchronousQueue
    import java.util.concurrent.ThreadPoolExecutor
    import java.util.concurrent.TimeUnit
    import java.util.concurrent.atomic.AtomicReference
    import kotlin.test.assertFailsWith
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import mockwebserver3.SocketPolicy.DisconnectAtEnd
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  7. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

      }
    
      @Test
      fun fullCallTimeoutDoesNotApplyOnceConnected() {
        client =
          client.newBuilder()
            .callTimeout(250, TimeUnit.MILLISECONDS)
            .build()
        server.enqueue(
          MockResponse.Builder()
            .bodyDelay(500, TimeUnit.MILLISECONDS)
            .setHeader("content-type", "text/event-stream")
            .body("data: hey\n\n")
            .build(),
        )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  8. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        val elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedNanos)
        assertThat(elapsedMillis).isBetween(500L, 1000L)
      }
    
      /** Delay the response body by sleeping 1s.  */
      @Test
      fun delayResponse() {
        assumeNotWindows()
        server.enqueue(
          MockResponse()
            .setBody("ABCDEF")
            .setBodyDelay(1, TimeUnit.SECONDS),
        )
        val startNanos = System.nanoTime()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  9. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        val elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedNanos)
        assertThat(elapsedMillis).isBetween(500L, 1000L)
      }
    
      /** Delay the response body by sleeping 1s.  */
      @Test
      fun delayResponse() {
        assumeNotWindows()
        server.enqueue(
          MockResponse.Builder()
            .body("ABCDEF")
            .bodyDelay(1, TimeUnit.SECONDS)
            .build(),
        )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        mockResponse = mockResponse.throttleBody(0L, 0L, TimeUnit.SECONDS)
        var throttleBytesPerPeriod: Long = mockResponse.throttleBytesPerPeriod
        throttleBytesPerPeriod = mockResponse.throttleBytesPerPeriod
        var throttlePeriod: Long = mockResponse.getThrottlePeriod(TimeUnit.SECONDS)
        mockResponse = mockResponse.setBodyDelay(0L, TimeUnit.SECONDS)
        val bodyDelay: Long = mockResponse.getBodyDelay(TimeUnit.SECONDS)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
Back to top