Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for double (0.33 sec)

  1. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        val elapsedNanos = System.nanoTime() - startNanos
        val elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedNanos)
    
        // If we're working correctly, this should be greater than 100ms, but less than double that.
        // Previously we had a bug where we would download the entire response body as long as no
        // individual read took longer than 100ms.
        assertThat(elapsedMillis).isLessThan(500L)
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  2. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

        val deltaMillis = 1000.0
        val durationMillis = TimeUnit.MINUTES.toMillis((60 * 24).toLong())
        assertThat(certificate.notBefore.time.toDouble())
          .isCloseTo(now.toDouble(), deltaMillis)
        assertThat(certificate.notAfter.time.toDouble())
          .isCloseTo(now.toDouble() + durationMillis, deltaMillis)
      }
    
      @Test
      fun customInterval() {
        // 5 seconds starting on 1970-01-01.
        val heldCertificate =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt

          assertThat(result).isInstanceOf(eventClass)
        }
    
        if (elapsedMs != -1L) {
          assertThat(
            TimeUnit.NANOSECONDS.toMillis(actualElapsedNs)
              .toDouble(),
          )
            .isCloseTo(elapsedMs.toDouble(), 100.0)
        }
    
        return result
      }
    
      fun recordedEventTypes() = eventSequence.map { it.name }
    
      fun clearAllEvents() {
        while (eventSequence.isNotEmpty()) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  4. docs/features/events.md

        printEvent("dnsStart");
      }
    
      @Override public void dnsEnd(Call call, String domainName, List<InetAddress> inetAddressList) {
        printEvent("dnsEnd");
      }
    
      ...
    }
    ```
    
    We make a couple calls:
    
    ```java
    Request request = new Request.Builder()
        .url("https://publicobject.com/helloworld.txt")
        .build();
    
    System.out.println("REQUEST 1 (new connection)");
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 7.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/-MediaTypeCommon.kt

        if (name == null) {
          s = parameter.range.last + 1
          continue
        }
    
        val token = parameter.groups[2]?.value
        val value =
          when {
            token == null -> {
              // Value is "double-quoted". That's valid and our regex group already strips the quotes.
              parameter.groups[3]!!.value
            }
            token.startsWith("'") && token.endsWith("'") && token.length > 2 -> {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  6. okhttp-idna-mapping-table/src/main/resources/okhttp3/internal/idna/IdnaMappingTable.txt

    035D..035F    ; valid                                  # 4.0  COMBINING DOUBLE BREVE..COMBINING DOUBLE MACRON BELOW
    0360..0361    ; valid                                  # 1.1  COMBINING DOUBLE TILDE..COMBINING DOUBLE INVERTED BREVE
    0362          ; valid                                  # 3.0  COMBINING DOUBLE RIGHTWARDS ARROW BELOW
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Feb 10 11:25:47 GMT 2024
    - 854.1K bytes
    - Viewed (2)
  7. mockwebserver/src/main/kotlin/mockwebserver3/internal/TriggerSink.kt

      private val trigger: () -> Unit,
    ) : Sink by delegate {
      private var bytesWritten = 0L
    
      override fun write(
        source: Buffer,
        byteCount: Long,
      ) {
        if (byteCount == 0L) return // Avoid double-triggering.
    
        if (bytesWritten == triggerByteCount) {
          source.skip(byteCount)
          return
        }
    
        val toWrite = minOf(byteCount, triggerByteCount - bytesWritten)
        bytesWritten += toWrite
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt

    }
    
    private fun Buffer.startsWith(prefix: Byte): Boolean = !exhausted() && this[0] == prefix
    
    /**
     * Reads a double-quoted string, unescaping quoted pairs like `\"` to the 2nd character in each
     * sequence. Returns the unescaped string, or null if the buffer isn't prefixed with a
     * double-quoted string.
     */
    @Throws(EOFException::class)
    private fun Buffer.readQuotedString(): String? {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  9. docs/changelogs/upgrading_to_okhttp_4.md

    
    Code Cleanup
    ------------
    
    IntelliJ and Android Studio offer a **Code Cleanup** feature that will automatically update
    deprecated APIs with their replacements. Access this feature from the _Search Anywhere_ dialog
    (double-press shift) or under the _Analyze_ menu.
    
    We’ve included deprecated APIs in OkHttp 4.0 because they make migration easy. We will remove them
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 16:58:16 GMT 2022
    - 10.9K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CacheTest.kt

        val response1 = get(server.url("/a"))
        assertThat(response1.body.string()).isEqualTo("A")
        assertThat(response1.header("Allow")).isNull()
        assertThat((response1.receivedResponseAtMillis - t0).toDouble()).isCloseTo(0.0, 250.0)
    
        // A conditional cache hit updates the cache.
        Thread.sleep(500) // Make sure t0 and t1 are distinct.
        val t1 = System.currentTimeMillis()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
Back to top