Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for dela (0.13 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt

      }
    
      /** Returns a new bias. */
      private fun adapt(
        delta: Int,
        numpoints: Int,
        first: Boolean,
      ): Int {
        var delta =
          when {
            first -> delta / DAMP
            else -> delta / 2
          }
        delta += (delta / numpoints)
        var k = 0
        while (delta > ((BASE - TMIN) * TMAX) / 2) {
          delta /= (BASE - TMIN)
          k += BASE
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 03 03:04:50 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  2. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

        }
    
        /**
         * Set the delayed time of the response body to [delay]. This applies to the response body
         * only; response headers are not affected.
         */
        fun bodyDelay(
          delay: Long,
          unit: TimeUnit,
        ) = apply {
          bodyDelayNanos = unit.toNanos(delay)
        }
    
        fun headersDelay(
          delay: Long,
          unit: TimeUnit,
        ) = apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  3. okhttp/src/main/kotlin/okhttp3/internal/concurrent/Task.kt

     * task should not be executed again. Otherwise it returns a delay until the next execution.
     *
     * A task has at most one next execution. If the same task instance is scheduled multiple times, the
     * earliest one wins. This applies to both executions scheduled with [TaskRunner.Queue.schedule] and
     * those implied by the returned execution delay.
     *
     * Cancellation
     * ------------
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  4. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

      }
    
      /**
       * Throttle the request body by sleeping 500ms after every 3 bytes. With a 6-byte request, this
       * should yield one sleep for a total delay of 500ms.
       */
      @Test
      fun throttleRequest() {
        assumeNotWindows()
        server.enqueue(
          MockResponse()
            .throttleBody(3, 500, TimeUnit.MILLISECONDS),
        )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/CallTest.kt

        sink.writeUtf8(data)
        sink.close()
        return result
      }
    
      private fun cancelLater(
        call: Call,
        delay: Long,
      ): Thread {
        val thread =
          object : Thread("canceler") {
            override fun run() {
              try {
                sleep(delay)
              } catch (e: InterruptedException) {
                throw AssertionError()
              }
              call.cancel()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

          eachQueue@ for (queue in readyQueues) {
            val candidate = queue.futureTasks[0]
            val candidateDelay = maxOf(0L, candidate.nextExecuteNanoTime - now)
    
            when {
              // Compute the delay of the soonest-executable task.
              candidateDelay > 0L -> {
                minDelayNanos = minOf(candidateDelay, minDelayNanos)
                continue@eachQueue
              }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/InterceptorTest.kt

      fun networkInterceptorThrowsRuntimeExceptionSynchronous() {
        interceptorThrowsRuntimeExceptionSynchronous(true)
      }
    
      /**
       * When an interceptor throws an unexpected exception, synchronous callers can catch it and deal
       * with it.
       */
      private fun interceptorThrowsRuntimeExceptionSynchronous(network: Boolean) {
        addInterceptor(network) { chain: Interceptor.Chain? -> throw RuntimeException("boom!") }
        val request =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

      ) {
        setUp(protocol, mockWebServer)
        // Ping every 500 ms, starting at 500 ms.
        client =
          client.newBuilder()
            .pingInterval(Duration.ofMillis(500))
            .build()
    
        // Delay the response to give 1 ping enough time to be sent and replied to.
        server.enqueue(
          MockResponse.Builder()
            .bodyDelay(750, TimeUnit.MILLISECONDS)
            .body("ABC")
            .build(),
        )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  9. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt

      fun setBodyDelay(
        delay: Long,
        unit: TimeUnit,
      ) = apply {
        bodyDelayAmount = delay
        bodyDelayUnit = unit
      }
    
      fun getBodyDelay(unit: TimeUnit): Long = unit.convert(bodyDelayAmount, bodyDelayUnit)
    
      fun setHeadersDelay(
        delay: Long,
        unit: TimeUnit,
      ) = apply {
        headersDelayAmount = delay
        headersDelayUnit = unit
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

            // Minimise test flakiness due to possible race conditions with connections closing.
            // Some number of tests will report here, but not fail due to this delay.
            println("Delaying to avoid flakes")
            Thread.sleep(500L)
            println("After delay: " + connectionPool.connectionCount())
          }
    
          connectionPool.evictAll()
          assertEquals(0, connectionPool.connectionCount()) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top