Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. okhttp/src/main/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon May 13 13:42:37 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 75.4K bytes
    - Viewed (0)
Back to top