Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for toMillis (0.15 sec)

  1. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

         * The default value is 0 which imposes no timeout.
         */
        @SuppressLint("NewApi")
        @IgnoreJRERequirement
        fun callTimeout(duration: Duration) =
          apply {
            callTimeout(duration.toMillis(), MILLISECONDS)
          }
    
        /**
         * Sets the default timeout for complete calls. A value of 0 means no timeout, otherwise values
         * must be between 1 and [Integer.MAX_VALUE] when converted to milliseconds.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:21:33 GMT 2024
    - 52K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

          stream.takeHeaders()
        }
        val elapsedNanos = System.nanoTime() - startNanos
        awaitWatchdogIdle()
        // 200ms delta
        assertThat(TimeUnit.NANOSECONDS.toMillis(elapsedNanos).toDouble())
          .isCloseTo(500.0, 200.0)
        assertThat(connection.openStreamCount()).isEqualTo(0)
    
        // Verify the peer received what was expected.
    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)
  3. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

          assertThat(expected.message).isEqualTo(
            "stream was reset: PROTOCOL_ERROR",
          )
        }
        val elapsedUntilFailure = System.nanoTime() - executeAtNanos
        assertThat(TimeUnit.NANOSECONDS.toMillis(elapsedUntilFailure).toDouble())
          .isCloseTo(1000.0, 250.0)
    
        // Confirm a single ping was sent but not acknowledged.
        val logs = testLogHandler.takeAll()
    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)
Back to top