- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 36 for toNanos (0.06 sec)
-
mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt
throttlePeriodNanos = unit.toNanos(period) } /** * Set the delayed time of the response body to [delay]. This applies to the response body * only; response headers are not affected. */ fun bodyDelay( delay: Long, unit: TimeUnit, ) = apply { bodyDelayNanos = unit.toNanos(delay) } fun headersDelay( delay: Long,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 13.3K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/DirectExecutorService.java
synchronized (lock) { return shutdown && runningTasks == 0; } } @Override public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException { long nanos = unit.toNanos(timeout); synchronized (lock) { while (true) { if (shutdown && runningTasks == 0) { return true; } else if (nanos <= 0) { return false; } else {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 3.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java
private static void joinUninterruptibly(Thread thread, long timeout, TimeUnit unit) { boolean interrupted = false; try { long remainingNanos = unit.toNanos(timeout); long end = System.nanoTime() + remainingNanos; while (true) { try { // TimeUnit.timedJoin() treats negative timeouts just like zero.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java
private static void joinUninterruptibly(Thread thread, long timeout, TimeUnit unit) { boolean interrupted = false; try { long remainingNanos = unit.toNanos(timeout); long end = System.nanoTime() + remainingNanos; while (true) { try { // TimeUnit.timedJoin() treats negative timeouts just like zero.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.4K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/ListenableFutureTask.java
} @CanIgnoreReturnValue @Override @ParametricNullness public V get(long timeout, TimeUnit unit) throws TimeoutException, InterruptedException, ExecutionException { long timeoutNanos = unit.toNanos(timeout); if (timeoutNanos <= OverflowAvoidingLockSupport.MAX_NANOSECONDS_THRESHOLD) { return super.get(timeout, unit); } // Waiting 68 years should be enough for any program. return super.get(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Apr 04 09:45:04 UTC 2023 - 4.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt
*/ internal class FastFallbackExchangeFinder( override val routePlanner: RoutePlanner, private val taskRunner: TaskRunner, ) : ExchangeFinder { private val connectDelayNanos = TimeUnit.MILLISECONDS.toNanos(250L) private var nextTcpConnectAtNanos = Long.MIN_VALUE /** * Plans currently being connected, and that will later be added to [connectResults]. This is
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt
client.newBuilder() .callTimeout(Duration.ofMillis(456)) .build() val call = timeoutClient.newCall(request) assertThat(call.timeout().timeoutNanos()) .isEqualTo(TimeUnit.MILLISECONDS.toNanos(456)) } @Test fun timeoutWritingRequest() { server.enqueue(MockResponse()) val request = Request.Builder() .url(server.url("/")) .post(sleepingRequestBody(500))
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.5K 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() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 52K bytes - Viewed (0) -
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() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 51.6K 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
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 29 00:33:04 UTC 2024 - 12.6K bytes - Viewed (0)