Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for deadlineNanoTime (0.05 sec)

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

      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 {
        val skipBuffer = Buffer()
        while (read(skipBuffer, 8192) != -1L) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/Http2ConnectionTest.kt

        val latch = CountDownLatch(1)
        val watchdogJob: AsyncTimeout =
          object : AsyncTimeout() {
            override fun timedOut() {
              latch.countDown()
            }
          }
        watchdogJob.deadlineNanoTime(System.nanoTime()) // Due immediately!
        watchdogJob.enter()
        latch.await()
      }
    
      private fun connectWithSettings(
        client: Boolean,
        settings: Settings?,
      ): Http2Connection {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 75.5K bytes
    - Viewed (0)
Back to top