- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 62 for nanoTime (0.1 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
unit: TimeUnit, ): T? { taskRunner.lock.withLock { val waitUntil = nanoTime + unit.toNanos(timeout) while (true) { val result = poll() if (result != null) return result if (nanoTime >= waitUntil) return null val editCountBefore = editCount yieldUntil { nanoTime >= waitUntil || editCount > editCountBefore } } } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 29 00:33:04 UTC 2024 - 12.6K bytes - Viewed (0) -
guava/src/com/google/common/base/Stopwatch.java
* (by default) uses {@link System#nanoTime}, it is unaffected by these changes. * * <p>Use this class instead of direct calls to {@link System#nanoTime} for two reasons: * * <ul> * <li>The raw {@code long} values returned by {@code nanoTime} are meaningless and unsafe to use * in any other way than how {@code Stopwatch} uses them.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 9.3K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt
override fun requestHeadersStart(call: Call) = logEvent(RequestHeadersStart(System.nanoTime(), call)) override fun requestHeadersEnd( call: Call, request: Request, ) = logEvent(RequestHeadersEnd(System.nanoTime(), call, request.headers.byteCount())) override fun requestBodyStart(call: Call) = logEvent(RequestBodyStart(System.nanoTime(), call))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/base/StopwatchBenchmark.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 1.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/CancelCall.java
.build(); final long startNanos = System.nanoTime(); final Call call = client.newCall(request); // Schedule a job to cancel the call in 1 second. executor.schedule(() -> { System.out.printf("%.2f Canceling call.%n", (System.nanoTime() - startNanos) / 1e9f); call.cancel(); System.out.printf("%.2f Canceled call.%n", (System.nanoTime() - startNanos) / 1e9f); }, 1, TimeUnit.SECONDS);
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 12 03:31:36 UTC 2019 - 2.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt
redQueue.execute("task one", 100.µs) { log += "one:run@${taskFaker.nanoTime} parallel=${taskFaker.isParallel}" } redQueue.execute("task two", 100.µs) { log += "two:run@${taskFaker.nanoTime} parallel=${taskFaker.isParallel}" } redQueue.execute("task three", 100.µs) { log += "three:run@${taskFaker.nanoTime} parallel=${taskFaker.isParallel}" } taskFaker.advanceUntil(0.µs)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 29 00:33:04 UTC 2024 - 23K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/CancelCall.kt
.build() val startNanos = System.nanoTime() val call = client.newCall(request) // Schedule a job to cancel the call in 1 second. executor.schedule({ System.out.printf("%.2f Canceling call.%n", (System.nanoTime() - startNanos) / 1e9f) call.cancel() System.out.printf("%.2f Canceled call.%n", (System.nanoTime() - startNanos) / 1e9f) }, 1, TimeUnit.SECONDS)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/Uninterruptibles.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 19.1K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/RecordingConnectionListener.kt
) { logEvent(ConnectionEvent.ConnectEnd(System.nanoTime(), connection, route, call)) } override fun connectionClosed(connection: Connection) = logEvent(ConnectionEvent.ConnectionClosed(System.nanoTime(), connection)) override fun connectionAcquired( connection: Connection, call: Call, ) { logEvent(ConnectionEvent.ConnectionAcquired(System.nanoTime(), connection, call)) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.6K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 20.1K bytes - Viewed (0)