Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for deadlineNanoTime (0.21 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) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K 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 {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
Back to top