Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for nowNs (0.02 sec)

  1. okhttp/src/main/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 {
        val skipBuffer = Buffer()
    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/main/kotlin/okhttp3/internal/connection/RealConnection.kt

        ) {
          return false
        }
    
        val http2Connection = this.http2Connection
        if (http2Connection != null) {
          return http2Connection.isHealthy(nowNs)
        }
    
        val idleDurationNs = lock.withLock { nowNs - idleAtNs }
        if (idleDurationNs >= IDLE_CONNECTION_HEALTHY_NS && doExtensiveChecks) {
          return socket.isHealthy(source)
        }
    
        return true
      }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

            okHttpSettings.merge(settings)
          }
          writer.settings(settings)
        }
      }
    
      fun isHealthy(nowNs: Long): Boolean {
        this.withLock {
          if (isShutdown) return false
    
          // A degraded pong is overdue.
          if (degradedPongsReceived < degradedPingsSent && nowNs >= degradedPongDeadlineNs) return false
    
          return true
        }
      }
    
      /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 32.6K bytes
    - Viewed (0)
Back to top