- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 40 for Sleep (0.35 sec)
-
guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java
} } /** * Delays, via Thread.sleep, for the given millisecond delay, but if the sleep is shorter than * specified, may re-sleep or yield until time elapses. */ static void delay(long millis) throws InterruptedException { long startTime = System.nanoTime(); long ns = millis * 1000 * 1000; for (; ; ) { if (millis > 0L) Thread.sleep(millis); else // too short to sleep
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:15:24 GMT 2024 - 37.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/TestThread.java
checkNotNull(methodName); checkNotNull(arguments); assertEquals(false, invokeMethod("hasQueuedThread", this)); sendRequest(methodName, arguments); Thread.sleep(DUE_DILIGENCE_MILLIS); assertEquals(true, invokeMethod("hasQueuedThread", this)); assertNull(responseQueue.poll()); } /**
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Apr 26 20:07:17 GMT 2023 - 10.9K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/RateLimiter.java
* * T0 at 0 seconds * T1 at 1.05 seconds * T2 at 2 seconds * T3 at 3 seconds * * Due to the slight delay of T1, T2 would have to sleep till 2.05 seconds, and T3 would also * have to sleep till 3.05 seconds. */ return create(permitsPerSecond, SleepingStopwatch.createFromSystemTimer()); } @VisibleForTesting
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Apr 04 09:45:04 GMT 2023 - 18.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java
public String call() throws InterruptedException { MILLISECONDS.sleep(DELAY_MS); return GOOD_CALLABLE_RESULT; } }; private static final Callable<String> BAD_CALLABLE = new Callable<String>() { @Override public String call() throws InterruptedException, SampleException { MILLISECONDS.sleep(DELAY_MS); throw new SampleException(); } };
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 9.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheReferencesTest.java
for (int i = 0; i < 500; i++) { System.gc(); CacheTesting.drainReferenceQueues(cache); if (cache.size() == 1) { break; } try { Thread.sleep(10); } catch (InterruptedException e) { /* ignore */ } try { // Fill up heap so soft references get cleared. filler = new byte[Math.max(filler.length, filler.length * 2)];
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 6.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/SuppliersTest.java
List<Integer> result = addSupplier.get(); assertEquals(Integer.valueOf(0), result.get(0)); assertEquals(Integer.valueOf(1), result.get(1)); } @J2ktIncompatible @GwtIncompatible // Thread.sleep @SuppressWarnings("DoNotCall") public void testMemoizeWithExpiration_longTimeUnit() throws InterruptedException { CountingSupplier countingSupplier = new CountingSupplier();
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
List<Integer> result = addSupplier.get(); assertEquals(Integer.valueOf(0), result.get(0)); assertEquals(Integer.valueOf(1), result.get(1)); } @J2ktIncompatible @GwtIncompatible // Thread.sleep @SuppressWarnings("DoNotCall") public void testMemoizeWithExpiration_longTimeUnit() throws InterruptedException { CountingSupplier countingSupplier = new CountingSupplier();
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri Feb 09 15:49:48 GMT 2024 - 18.1K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java
if (interrupted) { Thread.currentThread().interrupt(); } } } // TODO(user): Support Sleeper somehow (wrapper or interface method)? /** Invokes {@code unit.}{@link TimeUnit#sleep(long) sleep(sleepFor)} uninterruptibly. */ @J2ktIncompatible @GwtIncompatible // concurrency @SuppressWarnings("GoodTime") // should accept a java.time.Duration
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Apr 04 09:45:04 GMT 2023 - 14.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java
final int millis; volatile boolean completed; public SleepingRunnable(int millis) { this.millis = millis; } @Override public void run() { try { Thread.sleep(millis); } catch (InterruptedException wontHappen) { throw new AssertionError(); } completed = true; } }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 9.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java
public String call() throws InterruptedException { MILLISECONDS.sleep(DELAY_MS); return GOOD_CALLABLE_RESULT; } }; private static final Callable<String> BAD_CALLABLE = new Callable<String>() { @Override public String call() throws InterruptedException, SampleException { MILLISECONDS.sleep(DELAY_MS); throw new SampleException(); } };
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 9.5K bytes - Viewed (0)