- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for toMillis (0.06 sec)
-
okhttp/src/jvmTest/kotlin/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())
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 2.1K bytes - Viewed (0) -
api/maven-api-core/src/test/java/org/apache/maven/api/MonotonicClockTest.java
// Allow for small timing differences (1ms) due to execution time between measurements assertTrue( Math.abs(elapsed.toMillis() - calculated.toMillis()) <= 1, "Elapsed time should match calculated duration between start and now"); } } @Test @DisplayName("MonotonicClock should handle rapid successive calls")
Registered: Sun Sep 07 03:35:12 UTC 2025 - Last Modified: Wed Jan 15 06:28:29 UTC 2025 - 5.8K 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(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Apr 01 11:07:32 UTC 2024 - 5.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/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()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.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); });
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Jul 17 08:28:31 UTC 2025 - 5.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheCorruptionTest.kt
* positive values yield dates in the future. */ private fun formatDate( delta: Long, timeUnit: TimeUnit, ): String? = 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")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 6K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/MockSocketHandler.kt
fun exhaustResponse() = apply { actions += { stream -> stream.sink.close() } } fun sleep( duration: Long, unit: TimeUnit, ) = apply { actions += { Thread.sleep(unit.toMillis(duration)) } } override fun handle(socket: Socket) { val task = serviceSocketTask(socket.asBufferedSocket()) results.add(task) task.run() }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 3.3K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/ClientRuleEventListener.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:58:02 UTC 2025 - 6.5K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt
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 }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri May 30 21:28:20 UTC 2025 - 5.7K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt
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 }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:58:02 UTC 2025 - 9.5K bytes - Viewed (0)