- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 43 for toMillis (0.2 sec)
-
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) -
okhttp/src/test/java/okhttp3/AutobahnTester.kt
} }, ) check(latch.await(30, TimeUnit.SECONDS)) { "Timed out waiting for test $number to finish." } val endNanos = System.nanoTime() val tookMs = TimeUnit.NANOSECONDS.toMillis(endNanos - startNanos.get()) println("Took ${tookMs}ms") } private fun getTestCount(): Long { val latch = CountDownLatch(1) val countRef = AtomicLong()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.6K bytes - Viewed (0) -
maven-core/src/main/java/org/apache/maven/ReactorReader.java
// Not using File#lastModified() to avoid a Linux JDK8 milliseconds precision bug: JDK-8177809. long artifactLastModified = Files.getLastModifiedTime(packagedArtifactFile.toPath()).toMillis(); if (session.getProjectBuildingRequest().getBuildStartTime() != null) { long buildStartTime = session.getProjectBuildingRequest().getBuildStartTime().getTime();
Java - Registered: Sun May 05 03:35:11 GMT 2024 - Last Modified: Thu May 02 16:33:18 GMT 2024 - 21.3K bytes - Viewed (0) -
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) rfc1123.timeZone = TimeZone.getTimeZone("GMT")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 6K bytes - Viewed (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) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt
val startNanos = System.nanoTime() while (webSocket.receivedPongCount() < 3) { Thread.sleep(50) } val elapsedUntilPong3 = System.nanoTime() - startNanos assertThat(TimeUnit.NANOSECONDS.toMillis(elapsedUntilPong3).toDouble()) .isCloseTo(1500.0, 250.0) // The client pinged the server 3 times, and it has ponged back 3 times. assertThat(webSocket.sentPingCount()).isEqualTo(3)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 35.2K bytes - Viewed (1)