Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for currentTimeMillis (0.23 sec)

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

    import okhttp3.Request
    import okhttp3.Response
    import okhttp3.internal.concurrent.TaskRunner
    import okhttp3.internal.connection.RealConnection
    
    internal fun parseCookie(
      currentTimeMillis: Long,
      url: HttpUrl,
      setCookie: String,
    ): Cookie? = Cookie.parse(currentTimeMillis, url, setCookie)
    
    internal fun cookieToString(
      cookie: Cookie,
      forObsoleteRfc2965: Boolean,
    ): String = cookie.toString(forObsoleteRfc2965)
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/internal/http2/Http2FlowControlConnectionListener.kt

     */
    class Http2FlowControlConnectionListener : ConnectionListener(), FlowControlListener {
      val start = System.currentTimeMillis()
    
      override fun receivingStreamWindowChanged(
        streamId: Int,
        windowCounter: WindowCounter,
        bufferSize: Long,
      ) {
        println("${System.currentTimeMillis() - start},$streamId,${windowCounter.unacknowledged},$bufferSize")
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  3. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/TestDohMain.kt

    import okhttp3.dnsoverhttps.DohProviders.providers
    import org.conscrypt.OpenSSLProvider
    
    private fun runBatch(
      dnsProviders: List<DnsOverHttps>,
      names: List<String>,
    ) {
      var time = System.currentTimeMillis()
      for (dns in dnsProviders) {
        println("Testing ${dns.url}")
        for (host in names) {
          print("$host: ")
          System.out.flush()
          try {
            val results = dns.lookup(host)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  4. okhttp-tls/src/test/java/okhttp3/tls/HeldCertificateTest.kt

    import org.junit.jupiter.api.extension.RegisterExtension
    
    class HeldCertificateTest {
      @RegisterExtension
      var platform = PlatformRule()
    
      @Test
      fun defaultCertificate() {
        val now = System.currentTimeMillis()
        val heldCertificate = HeldCertificate.Builder().build()
        val certificate = heldCertificate.certificate
        assertThat(certificate.getSubjectX500Principal().name, "self-signed")
    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)
  5. okhttp/src/test/java/okhttp3/CacheTest.kt

       */
      @Test
      fun retainServedDateFormat() {
        // Serve a response with a non-standard date format that OkHttp supports.
        val lastModifiedDate = Date(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(-1))
        val servedDate = Date(System.currentTimeMillis() + TimeUnit.HOURS.toMillis(-2))
        val dateFormat: DateFormat = SimpleDateFormat("EEE dd-MMM-yyyy HH:mm:ss z", Locale.US)
    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)
  6. okhttp/src/main/kotlin/okhttp3/internal/http/CallServerInterceptor.kt

        val realChain = chain as RealInterceptorChain
        val exchange = realChain.exchange!!
        val request = realChain.request
        val requestBody = request.body
        val sentRequestMillis = System.currentTimeMillis()
    
        var invokeStartEvent = true
        var responseBuilder: Response.Builder? = null
        var sendRequestException: IOException? = null
        try {
          exchange.writeRequestHeaders(request)
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.3K bytes
    - Viewed (1)
  7. okhttp/src/main/kotlin/okhttp3/Cookie.kt

         * [setCookie] is not a well-formed cookie.
         */
        @JvmStatic
        fun parse(
          url: HttpUrl,
          setCookie: String,
        ): Cookie? = parse(System.currentTimeMillis(), url, setCookie)
    
        internal fun parse(
          currentTimeMillis: Long,
          url: HttpUrl,
          setCookie: String,
        ): Cookie? {
          val cookiePairEnd = setCookie.delimiterOffset(';')
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:12:05 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

      @Throws(IOException::class)
      override fun intercept(chain: Interceptor.Chain): Response {
        val call = chain.call()
        val cacheCandidate = cache?.get(chain.request().requestForCache())
    
        val now = System.currentTimeMillis()
    
        val strategy = CacheStrategy.Factory(now, chain.request(), cacheCandidate).compute()
        val networkRequest = strategy.networkRequest
        val cacheResponse = strategy.cacheResponse
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt

        init {
          ecdsa256()
        }
    
        /**
         * Sets the certificate to be valid in ```[notBefore..notAfter]```. Both endpoints are specified
         * in the format of [System.currentTimeMillis]. Specify -1L for both values to use the default
         * interval, 24 hours starting when the certificate is created.
         */
        fun validityInterval(
          notBefore: Long,
          notAfter: Long,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.6K bytes
    - Viewed (1)
  10. okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt

       *     positive values yield dates in the future.
       */
      private fun formatDate(
        delta: Long,
        timeUnit: TimeUnit,
      ): String? {
        return formatDate(Date(System.currentTimeMillis() + timeUnit.toMillis(delta)))
      }
    
      private fun formatDate(date: Date): String? {
        val rfc1123: DateFormat = SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 6K bytes
    - Viewed (1)
Back to top