Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 59 for Delay (0.48 sec)

  1. 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)
  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. docs/config/README.md

    enabled by default. The following configuration settings allow for more staggered delay in terms of usage calculation. The scanner adapts to the system speed and completely pauses when the system is under load. It is possible to adjust the speed of the scanner and thereby the latency of updates being reflected. The delays between each operation of the scanner can be adjusted by the `mc admin config set alias/ delay=15.0`. By default the value is `10.0`. This means the scanner will sleep *10x* the...
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 11 21:48:54 GMT 2023
    - 17.7K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/kt/ConfigureTimeouts.kt

          .readTimeout(5, TimeUnit.SECONDS)
          .callTimeout(10, TimeUnit.SECONDS)
          .build()
    
      fun run() {
        val request =
          Request.Builder()
            .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay.
            .build()
    
        client.newCall(request).execute().use { response ->
          println("Response completed: $response")
        }
      }
    }
    
    fun main() {
      ConfigureTimeouts().run()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  5. 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)
  6. samples/guide/src/main/java/okhttp3/recipes/kt/PerCallSettings.kt

    import okhttp3.Request
    
    class PerCallSettings {
      private val client = OkHttpClient()
    
      fun run() {
        val request =
          Request.Builder()
            .url("http://httpbin.org/delay/1") // This URL is served with a 1 second delay.
            .build()
    
        // Copy to customize OkHttp for this request.
        val client1 =
          client.newBuilder()
            .readTimeout(500, TimeUnit.MILLISECONDS)
            .build()
        try {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/kt/CancelCall.kt

      private val executor = Executors.newScheduledThreadPool(1)
      private val client = OkHttpClient()
    
      fun run() {
        val request =
          Request.Builder()
            .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay.
            .build()
    
        val startNanos = System.nanoTime()
        val call = client.newCall(request)
    
        // Schedule a job to cancel the call in 1 second.
        executor.schedule({
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/DuplexTest.kt

        server.useHttps(handshakeCertificates.sslSocketFactory())
      }
    
      private inner class DelayedRequestBody(
        private val delegate: RequestBody,
        delay: Long,
        timeUnit: TimeUnit,
      ) : RequestBody() {
        private val delayMillis = timeUnit.toMillis(delay)
    
        override fun contentType() = delegate.contentType()
    
        override fun isDuplex() = true
    
        override fun writeTo(sink: BufferedSink) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  9. docs/recipes.md

          private val client = OkHttpClient()
    
          fun run() {
            val request = Request.Builder()
                .url("http://httpbin.org/delay/2") // This URL is served with a 2 second delay.
                .build()
    
            val startNanos = System.nanoTime()
            val call = client.newCall(request)
    
            // Schedule a job to cancel the call in 1 second.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
  10. src/packaging/common/systemd/fess.service

    # Set to "infinity" if you use the 'bootstrap.mlockall: true' option
    # in fess.yml and 'MAX_LOCKED_MEMORY=unlimited' in ${packaging.env.file}
    #LimitMEMLOCK=infinity
    
    # Shutdown delay in seconds, before process is tried to be killed with KILL (if configured)
    TimeoutStopSec=20
    
    [Install]
    WantedBy=multi-user.target
    
    Plain Text
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Sun Jan 15 06:32:15 GMT 2023
    - 1.1K bytes
    - Viewed (0)
Back to top