- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 43 for toNanos (0.04 seconds)
-
android/guava-testlib/src/com/google/common/testing/FakeTicker.java
@SuppressWarnings("GoodTime") // should accept a java.time.Duration @CanIgnoreReturnValue public FakeTicker advance(long time, TimeUnit timeUnit) { return advance(timeUnit.toNanos(time)); } /** Advances the ticker value by {@code nanoseconds}. */ @SuppressWarnings("GoodTime") // should accept a java.time.Duration @CanIgnoreReturnValue public FakeTicker advance(long nanoseconds) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Apr 14 15:16:19 GMT 2025 - 4.1K bytes - Click Count (0) -
guava-testlib/src/com/google/common/testing/FakeTicker.java
@SuppressWarnings("GoodTime") // should accept a java.time.Duration @CanIgnoreReturnValue public FakeTicker advance(long time, TimeUnit timeUnit) { return advance(timeUnit.toNanos(time)); } /** Advances the ticker value by {@code nanoseconds}. */ @SuppressWarnings("GoodTime") // should accept a java.time.Duration @CanIgnoreReturnValue public FakeTicker advance(long nanoseconds) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Apr 14 15:16:19 GMT 2025 - 3.4K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java
public static boolean awaitUninterruptibly(CountDownLatch latch, long timeout, TimeUnit unit) { boolean interrupted = false; try { long remainingNanos = unit.toNanos(timeout); long end = System.nanoTime() + remainingNanos; while (true) { try { // CountDownLatch treats negative timeouts just like zero.
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Jan 29 23:24:32 GMT 2026 - 22.5K bytes - Click Count (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt
): Builder = apply { throttleBytesPerPeriod = bytesPerPeriod throttlePeriodNanos = unit.toNanos(period) } public fun headersDelay( delay: Long, unit: TimeUnit, ): Builder = apply { headersDelayNanos = unit.toNanos(delay) } /** * Set the delayed time of the response body to [delay]. This applies to the response bodyCreated: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Jun 20 11:46:46 GMT 2025 - 17.8K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/GcFinalization.java
public static void awaitDone(Future<?> future) { if (future.isDone()) { return; } long timeoutSeconds = timeoutSeconds(); long deadline = System.nanoTime() + SECONDS.toNanos(timeoutSeconds); do { System.runFinalization(); if (future.isDone()) { return; } System.gc(); try { future.get(1L, SECONDS); return;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 20:19:19 GMT 2026 - 12.3K bytes - Click Count (0) -
guava/src/com/google/common/collect/Internal.java
// Using a try/catch seems lazy, but the catch block will rarely get invoked (except for // durations longer than approximately +/- 292 years). try { return duration.toNanos(); } catch (ArithmeticException tooBig) { return duration.isNegative() ? Long.MIN_VALUE : Long.MAX_VALUE; } } private Internal() {}
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Nov 04 17:24:58 GMT 2025 - 1.7K bytes - Click Count (0) -
guava-testlib/src/com/google/common/testing/GcFinalization.java
public static void awaitDone(Future<?> future) { if (future.isDone()) { return; } long timeoutSeconds = timeoutSeconds(); long deadline = System.nanoTime() + SECONDS.toNanos(timeoutSeconds); do { System.runFinalization(); if (future.isDone()) { return; } System.gc(); try { future.get(1L, SECONDS); return;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 20:19:19 GMT 2026 - 12.3K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java
} @Override public boolean equals(@Nullable Object o) { if (o instanceof DurationSpec) { DurationSpec that = (DurationSpec) o; return unit.toNanos(duration) == that.unit.toNanos(that.duration); } return false; } @Override public String toString() { return MoreObjects.toStringHelper(this) .add("duration", duration)Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 7.5K bytes - Click Count (0) -
guava/src/com/google/common/base/Internal.java
// Using a try/catch seems lazy, but the catch block will rarely get invoked (except for // durations longer than approximately +/- 292 years). try { return duration.toNanos(); } catch (ArithmeticException tooBig) { return duration.isNegative() ? Long.MIN_VALUE : Long.MAX_VALUE; } } private Internal() {}
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Apr 14 15:16:19 GMT 2025 - 1.9K bytes - Click Count (0) -
android/guava/src/com/google/common/util/concurrent/Internal.java
// Using a try/catch seems lazy, but the catch block will rarely get invoked (except for // durations longer than approximately +/- 292 years). try { return duration.toNanos(); } catch (ArithmeticException tooBig) { return duration.isNegative() ? Long.MIN_VALUE : Long.MAX_VALUE; } } private Internal() {}
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Apr 14 16:07:06 GMT 2025 - 1.8K bytes - Click Count (0)