Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for checkDuration (0.23 sec)

  1. okhttp/src/test/java/okhttp3/internal/UtilTest.kt

        assertThat(checkDuration("timeout", 1.milliseconds)).isEqualTo(1)
    
        assertThat(
          assertThrows<IllegalStateException> {
            checkDuration("timeout", (-1).milliseconds)
          },
        ).hasMessage("timeout < 0")
        assertThat(
          assertThrows<IllegalArgumentException> {
            checkDuration("timeout", 1.nanoseconds)
          },
        ).hasMessage("timeout too small")
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http/RealInterceptorChain.kt

        return copy(connectTimeoutMillis = checkDuration("connectTimeout", timeout.toLong(), unit))
      }
    
      override fun readTimeoutMillis(): Int = readTimeoutMillis
    
      override fun withReadTimeout(
        timeout: Int,
        unit: TimeUnit,
      ): Interceptor.Chain {
        check(exchange == null) { "Timeouts can't be adjusted in a network interceptor" }
    
        return copy(readTimeoutMillis = checkDuration("readTimeout", timeout.toLong(), unit))
      }
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.2K bytes
    - Viewed (0)
Back to top