- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 44 for toNanos (0.15 sec)
-
android/guava/src/com/google/common/cache/CacheBuilderSpec.java
* nanos to match CacheBuilder implementation. */ @CheckForNull private static Long durationInNanos(long duration, @CheckForNull TimeUnit unit) { return (unit == null) ? null : unit.toNanos(duration); } /** Base class for parsing integers. */ abstract static class IntegerParser implements ValueParser { protected abstract void parseInteger(CacheBuilderSpec spec, int value);
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Aug 22 14:27:44 GMT 2022 - 18.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. */ /**
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed May 09 15:17:25 GMT 2018 - 13.6K bytes - Viewed (0) -
android/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. */ /**
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Apr 06 12:56:11 GMT 2023 - 13.6K 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 = TimeUnit.SECONDS.toNanos(60); final Supplier<Boolean> supplier = new Supplier<Boolean>() { boolean isWaiting(Thread thread) { switch (thread.getState()) { case BLOCKED:
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Fri Feb 09 15:49:48 GMT 2024 - 18.1K 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 = TimeUnit.SECONDS.toNanos(60); final Supplier<Boolean> supplier = new Supplier<Boolean>() { boolean isWaiting(Thread thread) { switch (thread.getState()) { case BLOCKED:
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Fri Feb 09 15:49:48 GMT 2024 - 18.1K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
override fun poll(): T = delegate.poll() override fun poll( timeout: Long, 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
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 29 00:33:04 GMT 2024 - 12.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.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 09 12:33:05 GMT 2024 - 10.5K 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 =
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 16.2K bytes - Viewed (0) -
guava/src/com/google/common/base/Suppliers.java
Supplier<T> delegate, long duration, TimeUnit unit) { checkNotNull(delegate); checkArgument(duration > 0, "duration (%s %s) must be > 0", duration, unit); return new ExpiringMemoizingSupplier<>(delegate, unit.toNanos(duration)); } /** * Returns a supplier that caches the instance supplied by the delegate and removes the cached * value after the specified time has passed. Subsequent calls to {@code get()} return the cached
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 15.3K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/CacheBuilder.java
"expireAfterWrite was already set to %s ns", expireAfterWriteNanos); checkArgument(duration >= 0, "duration cannot be negative: %s %s", duration, unit); this.expireAfterWriteNanos = unit.toNanos(duration); return this; } @SuppressWarnings("GoodTime") // nanos internally, should be Duration long getExpireAfterWriteNanos() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 44.8K bytes - Viewed (0)