- Sort Score
- Num 10 results
- Language All
Results 51 - 60 of 73 for nanotime1 (0.06 seconds)
-
android/guava-tests/test/com/google/common/base/SuppliersTest.java
public Boolean get() { // Check that this method is called exactly once, by the first // thread to synchronize. long t0 = System.nanoTime(); while (waitingThreads() != numThreads - 1) { if (System.nanoTime() - t0 > timeout) { thrown.set( new TimeoutException( "timed out waiting for other threads to block"
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Oct 28 16:03:47 GMT 2025 - 17.9K bytes - Click Count (0) -
samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java
} private static final class PrintingEventListener extends EventListener { long callStartNanos; private void printEvent(String name) { long nowNanos = System.nanoTime(); if (name.equals("callStart")) { callStartNanos = nowNanos; } long elapsedNanos = nowNanos - callStartNanos; System.out.printf("%.3f %s%n", elapsedNanos / 1000000000d, name); }Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sun Feb 16 23:20:49 GMT 2020 - 5.3K bytes - Click Count (0) -
src/test/java/jcifs/internal/fscc/FileSystemInformationTest.java
byte[] largeBuffer = new byte[10000]; FileFsSizeInformation info = new FileFsSizeInformation(); long startTime = System.nanoTime(); info.decode(largeBuffer, 0, 24); long endTime = System.nanoTime(); // Should complete quickly (under 1ms) assertTrue((endTime - startTime) < 1_000_000); } @ParameterizedTest
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 18.1K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealConnection.kt
} } internal fun incrementSuccessCount() { withLock { successCount++ } } @Throws(IOException::class) fun start() { idleAtNs = System.nanoTime() if (protocol == Protocol.HTTP_2 || protocol == Protocol.H2_PRIOR_KNOWLEDGE) { startHttp2() } } @Throws(IOException::class) private fun startHttp2() {
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Oct 07 21:55:03 GMT 2025 - 14.6K bytes - Click Count (0) -
src/main/java/jcifs/util/SmbCircuitBreaker.java
T result = operation.get(); long responseTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startTime); onSuccess(responseTime); return result; } catch (Exception e) { long responseTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startTime); onFailure(e, responseTime); if (e instanceof CIFSException) {
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 33.4K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt
if (routePlanner.isCanceled()) throw IOException("Canceled") // Launch a new connection if we're ready to. val now = taskRunner.backend.nanoTime() var awaitTimeoutNanos = nextTcpConnectAtNanos - now var connectResult: ConnectResult? = null if (tcpConnectsInFlight.isEmpty() || awaitTimeoutNanos <= 0) { connectResult = launchTcpConnect()
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Fri Dec 27 13:39:56 GMT 2024 - 5.8K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt
.url("http://" + TestUtil.UNREACHABLE_ADDRESS_IPV4) .build() val call = client.newCall(request1) val startNanos = System.nanoTime() assertFailsWith<SocketTimeoutException> { call.execute() } val elapsedNanos = System.nanoTime() - startNanos org.junit.jupiter.api.Assertions.assertTrue( elapsedNanos < TimeUnit.SECONDS.toNanos(5),
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Tue Nov 04 16:11:23 GMT 2025 - 28.2K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 20:45:32 GMT 2025 - 46.8K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 20:45:32 GMT 2025 - 46.8K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilJvm.kt
* deadline if one exists already. */ @Throws(IOException::class) internal fun Source.skipAll( duration: Int, timeUnit: TimeUnit, ): Boolean { val nowNs = System.nanoTime() val originalDurationNs = if (timeout().hasDeadline()) { timeout().deadlineNanoTime() - nowNs } else { Long.MAX_VALUE }
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Thu Jul 31 04:18:40 GMT 2025 - 10.2K bytes - Click Count (1)