- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 36 for toNanos (0.08 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt
minimumDeflateSize = minimumDeflateSize, ) this.writerTask = WriterTask() if (pingIntervalMillis != 0L) { val pingIntervalNanos = MILLISECONDS.toNanos(pingIntervalMillis) taskQueue.schedule("$name ping", pingIntervalNanos) { writePingFrame() return@schedule pingIntervalNanos } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 22.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java
*/ @CanIgnoreReturnValue @Override public V get(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, ExecutionException { return sync.get(unit.toNanos(timeout)); } /* * Improve the documentation of when InterruptedException is thrown. Our * behavior matches the JDK's, but the JDK's documentation is misleading. */ /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 13.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt
if (timeout().hasDeadline()) { timeout().deadlineNanoTime() - nowNs } else { Long.MAX_VALUE } timeout().deadlineNanoTime(nowNs + minOf(originalDurationNs, timeUnit.toNanos(duration.toLong()))) return try { val skipBuffer = Buffer() while (read(skipBuffer, 8192) != -1L) { skipBuffer.clear() } true // Success! The source has been exhausted.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 10.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/SuppliersTest.java
final AtomicReference<Throwable> thrown = new AtomicReference<>(null); final int numThreads = 3; final Thread[] threads = new Thread[numThreads]; final long timeout = SECONDS.toNanos(60); final Supplier<Boolean> supplier = new Supplier<Boolean>() { boolean isWaiting(Thread thread) { switch (thread.getState()) { case BLOCKED:
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 17.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/SuppliersTest.java
final AtomicReference<Throwable> thrown = new AtomicReference<>(null); final int numThreads = 3; final Thread[] threads = new Thread[numThreads]; final long timeout = SECONDS.toNanos(60); final Supplier<Boolean> supplier = new Supplier<Boolean>() { boolean isWaiting(Thread thread) { switch (thread.getState()) { case BLOCKED:
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 17.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt
internal val connectionListener: ConnectionListener, private val exchangeFinderFactory: (RealConnectionPool, Address, ConnectionUser) -> ExchangeFinder, ) { internal val keepAliveDurationNs: Long = timeUnit.toNanos(keepAliveDuration) @Volatile private var addressStates: Map<Address, AddressState> = mapOf() private val cleanupQueue: TaskQueue = taskRunner.newQueue() private val cleanupTask =
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 16.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/InterceptorTest.kt
assertFailsWith<SocketTimeoutException> { call.execute() } val elapsedNanos = System.nanoTime() - startNanos org.junit.jupiter.api.Assertions.assertTrue( elapsedNanos < TimeUnit.SECONDS.toNanos(5), "Timeout should have taken ~100ms but was " + elapsedNanos / 1e6 + " ms", ) } @Test fun chainWithReadTimeout() { val interceptor1 = Interceptor { chainA: Interceptor.Chain ->
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 27.8K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/MoreExecutors.java
checkArgument(ntasks > 0); List<Future<T>> futures = Lists.newArrayListWithCapacity(ntasks); BlockingQueue<Future<T>> futureQueue = Queues.newLinkedBlockingQueue(); long timeoutNanos = unit.toNanos(timeout); // For efficiency, especially in executors with limited // parallelism, check to see if previously submitted tasks are // done before submitting more of them. This interleaving
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 44.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
} void sleepMillis(int millis) { sleepMicros("U", MILLISECONDS.toMicros(millis)); } void sleepMicros(String caption, long micros) { instant += MICROSECONDS.toNanos(micros); events.add(caption + String.format(Locale.ROOT, "%3.2f", (micros / 1000000.0))); } @Override protected void sleepMicrosUninterruptibly(long micros) { sleepMicros("R", micros);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 21.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
} void sleepMillis(int millis) { sleepMicros("U", MILLISECONDS.toMicros(millis)); } void sleepMicros(String caption, long micros) { instant += MICROSECONDS.toNanos(micros); events.add(caption + String.format(Locale.ROOT, "%3.2f", (micros / 1000000.0))); } @Override protected void sleepMicrosUninterruptibly(long micros) { sleepMicros("R", micros);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 21.8K bytes - Viewed (0)