- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 69 for nanotime1 (0.22 sec)
-
guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java
long end = System.nanoTime() + remainingNanos; while (true) { try { // TimeUnit.timedJoin() treats negative timeouts just like zero. NANOSECONDS.timedJoin(thread, remainingNanos); return; } catch (InterruptedException e) { interrupted = true; remainingNanos = end - System.nanoTime(); } } } finally {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 4.4K bytes - Viewed (1) -
okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt
peer.sendFrame().ping(true, Http2Connection.AWAIT_PING, 5) peer.play() // Play it back. val connection = connect(peer) val pingAtNanos = System.nanoTime() connection.writePingAndAwaitPong() val elapsedNanos = System.nanoTime() - pingAtNanos assertThat(elapsedNanos).isGreaterThan(0L) assertThat(elapsedNanos).isLessThan(TimeUnit.SECONDS.toNanos(1))
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 75.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt
Int.MAX_VALUE, // keepAliveTime: 60L, TimeUnit.SECONDS, SynchronousQueue(), threadFactory, ) override fun nanoTime() = System.nanoTime() override fun coordinatorNotify(taskRunner: TaskRunner) { taskRunner.condition.signal() } /**
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 29 00:33:04 GMT 2024 - 10.6K bytes - Viewed (0) -
docs/features/events.md
return new PrintingEventListener(callId, System.nanoTime()); } }; final long callId; final long callStartNanos; public PrintingEventListener(long callId, long callStartNanos) { this.callId = callId; this.callStartNanos = callStartNanos; } private void printEvent(String name) { long elapsedNanos = System.nanoTime() - callStartNanos;
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 7.7K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Queues.java
Preconditions.checkNotNull(buffer); /* * This code performs one System.nanoTime() more than necessary, and in return, the time to * execute Queue#drainTo is not added *on top* of waiting for the timeout (which could make * the timeout arbitrarily inaccurate, given a queue that is slow to drain). */ long deadline = System.nanoTime() + unit.toNanos(timeout); int added = 0; while (added < numElements) {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 16K bytes - Viewed (0) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt
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) -
android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java
if (profileTests) runTestProfiled(); else super.runTest(); } protected void runTestProfiled() throws Throwable { long t0 = System.nanoTime(); try { super.runTest(); } finally { long elapsedMillis = (System.nanoTime() - t0) / (1000L * 1000L); if (elapsedMillis >= profileThreshold) System.out.printf("%n%s: %d%n", toString(), elapsedMillis); } }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 37.2K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt
} } private fun ensureAllTaskQueuesIdle() { val entryTime = System.nanoTime() for (queue in TaskRunner.INSTANCE.activeQueues()) { // We wait at most 1 second, so we don't ever turn multiple lost threads into // a test timeout failure. val waitTime = (entryTime + 1_000_000_000L - System.nanoTime()) if (!queue.idleLatch().await(waitTime, TimeUnit.NANOSECONDS)) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.5K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Monitor.java
* - System.nanoTime() is expensive enough that we want to call it the minimum required number of * times, typically once before invoking a blocking method. This often requires keeping track of * the first time in a method that nanoTime() has been invoked, for which the special value 0L * is reserved to mean "uninitialized". If timeout is non-positive, then nanoTime need never be * called.
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Dec 04 18:22:01 GMT 2023 - 38.6K bytes - Viewed (0) -
docs/features/interceptors.md
Request request = chain.request(); long t1 = System.nanoTime(); logger.info(String.format("Sending request %s on %s%n%s", request.url(), chain.connection(), request.headers())); Response response = chain.proceed(request); long t2 = System.nanoTime(); logger.info(String.format("Received response for %s in %.1fms%n%s",
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 8.1K bytes - Viewed (0)