Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for hasDeadline (0.2 seconds)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilJvm.kt

     */
    @Throws(IOException::class)
    internal fun Source.skipAll(
      duration: Int,
      timeUnit: TimeUnit,
    ): Boolean {
      val nowNs = System.nanoTime()
      val originalDurationNs =
        if (timeout().hasDeadline()) {
          timeout().deadlineNanoTime() - nowNs
        } else {
          Long.MAX_VALUE
        }
      timeout().deadlineNanoTime(nowNs + minOf(originalDurationNs, timeUnit.toNanos(duration.toLong())))
      return try {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 10.3K bytes
    - Click Count (1)
  2. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

          object : RequestBody() {
            override fun contentType(): MediaType = "text/plain".toMediaType()
    
            override fun writeTo(sink: BufferedSink) {
              assertThat(sink.timeout().hasDeadline()).isFalse()
              sink.writeUtf8("def")
            }
          }
        val request2 =
          Request
            .Builder()
            .url(server.url("/"))
            .method("POST", requestBody2)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Mar 15 09:02:18 GMT 2026
    - 146.5K bytes
    - Click Count (0)
Back to Top