- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for checkDuration (0.11 sec)
-
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: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3K bytes - Viewed (0) -
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: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt
import javax.net.ssl.X509TrustManager import kotlin.time.Duration as KotlinDuration import okhttp3.Protocol.HTTP_1_1 import okhttp3.Protocol.HTTP_2 import okhttp3.internal.asFactory import okhttp3.internal.checkDuration import okhttp3.internal.concurrent.TaskRunner import okhttp3.internal.connection.RealCall import okhttp3.internal.connection.RouteDatabase import okhttp3.internal.immutableListOf import okhttp3.internal.platform.Platform
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 04:21:33 UTC 2024 - 52K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt
} } internal fun checkDuration( name: String, duration: Long, unit: TimeUnit, ): Int { check(duration >= 0L) { "$name < 0" } val millis = unit.toMillis(duration) require(millis <= Integer.MAX_VALUE) { "$name too large" } require(millis != 0L || duration <= 0L) { "$name too small" } return millis.toInt() } internal fun checkDuration( name: String, duration: Duration,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 10.7K bytes - Viewed (0)