- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 32 for toMillis (0.33 sec)
-
okhttp/src/test/java/okhttp3/RecordingCallback.kt
val timeoutMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) + TIMEOUT_MILLIS while (true) { val i = responses.iterator() while (i.hasNext()) { val recordedResponse = i.next() if (recordedResponse.request.url.equals(url)) { i.remove() return recordedResponse } } val nowMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime())
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt
if (requestCaching.maxAgeSeconds != -1) { freshMillis = minOf(freshMillis, SECONDS.toMillis(requestCaching.maxAgeSeconds.toLong())) } var minFreshMillis: Long = 0 if (requestCaching.minFreshSeconds != -1) { minFreshMillis = SECONDS.toMillis(requestCaching.minFreshSeconds.toLong()) } var maxStaleMillis: Long = 0
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 15 13:24:48 GMT 2024 - 12K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
val inputStream = connection.getInputStream() assertThat(inputStream.read()).isEqualTo(-1) val elapsedNanos = System.nanoTime() - startNanos val elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedNanos) assertThat(elapsedMillis).isBetween(500L, 1000L) } /** * Throttle the response body by sleeping 500ms after every 3 bytes. With a 6-byte response, this
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 23.5K bytes - Viewed (0) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt
try { response = chain.proceed(request) } catch (e: Exception) { logger.log("<-- HTTP FAILED: $e") throw e } val tookMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNs) val responseBody = response.body!! val contentLength = responseBody.contentLength() val bodySize = if (contentLength != -1L) "$contentLength-byte" else "unknown-length"
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 06 09:14:38 GMT 2024 - 11.2K bytes - Viewed (1) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
val inputStream = connection.getInputStream() assertThat(inputStream.read()).isEqualTo(-1) val elapsedNanos = System.nanoTime() - startNanos val elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedNanos) assertThat(elapsedMillis).isBetween(500L, 1000L) } /** * Throttle the response body by sleeping 500ms after every 3 bytes. With a 6-byte response, this
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) -
mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/MockStreamHandler.kt
fun exhaustResponse() = apply { actions += { stream -> stream.responseBody.close() } } fun sleep( duration: Long, unit: TimeUnit, ) = apply { actions += { Thread.sleep(unit.toMillis(duration)) } } override fun handle(stream: Stream) { val task = serviceStreamTask(stream) results.add(task) task.run() }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.2K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt
lastTimestampNs = result.timestampNs if (eventClass != null) { 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 }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.6K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/ClientRuleEventListener.kt
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/admin/log/AdminLogAction.java
map.put("name", name); try { map.put("lastModified", new Date(Files.getLastModifiedTime(filePath).toMillis())); } catch (final IOException e) { throw new IORuntimeException(e); } logFileItems.add(map); });
Java - Registered: Mon May 06 08:04:11 GMT 2024 - Last Modified: Thu Feb 22 01:37:57 GMT 2024 - 4.7K bytes - Viewed (0) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/LoggingEventListener.kt
call: Call, cachedResponse: Response, ) { logWithTime("cacheConditionalHit: $cachedResponse") } private fun logWithTime(message: String) { val timeMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNs) logger.log("[$timeMs ms] $message") } open class Factory @JvmOverloads constructor(
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 01 11:07:32 GMT 2024 - 5.4K bytes - Viewed (0)