Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 224 for secunds (0.24 sec)

  1. android/guava/src/com/google/common/util/concurrent/RateLimiter.java

       * second" (commonly referred to as <i>QPS</i>, queries per second).
       *
       * <p>The returned {@code RateLimiter} ensures that on average no more than {@code
       * permitsPerSecond} are issued during any given second, with sustained requests being smoothly
       * spread over each second. When the incoming request rate exceeds {@code permitsPerSecond} the
    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)
  2. guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

        assertTrue(limiter.tryAcquire(0, SECONDS));
        assertFalse(limiter.tryAcquire(0, SECONDS));
        assertFalse(limiter.tryAcquire(0, SECONDS));
        stopwatch.sleepMillis(100);
        assertFalse(limiter.tryAcquire(0, SECONDS));
      }
    
      public void testTryAcquire_someWaitAllowed() {
        RateLimiter limiter = RateLimiter.create(5.0, stopwatch);
        assertTrue(limiter.tryAcquire(0, SECONDS));
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.6K bytes
    - Viewed (0)
  3. guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

        @SuppressWarnings("unused")
        public static final WithPublicConstants SECOND = new WithPublicConstants();
      }
    
      private static class FirstConstantIsNull {
        // To test that null constant is ignored
        @SuppressWarnings("unused")
        public static final @Nullable FirstConstantIsNull FIRST = null;
    
        public static final FirstConstantIsNull SECOND = new FirstConstantIsNull();
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

        runLatch.await();
        taskLatch.countDown();
    
        ExecutionException e =
            assertThrows(ExecutionException.class, () -> task.get(5, TimeUnit.SECONDS));
        assertEquals(IllegalStateException.class, e.getCause().getClass());
    
        assertTrue(listenerLatch.await(5, TimeUnit.SECONDS));
        assertTrue(task.isDone());
        assertFalse(task.isCancelled());
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

     * the License.
     */
    
    package com.google.common.util.concurrent.testing;
    
    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    import static java.util.concurrent.TimeUnit.SECONDS;
    
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.util.concurrent.ListenableFuture;
    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.ExecutionException;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 12 18:12:42 GMT 2023
    - 3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

        future.set(RESULT);
        /*
         * getUninterruptibly should call the timed get method once with a
         * wait of 0 seconds (and it should succeed, since the result is already
         * available).
         */
        assertEquals(RESULT, getUninterruptibly(future, 0, SECONDS));
      }
    
      public void testMakeUninterruptible_timedGetNegativeTimeoutAttempted()
          throws TimeoutException, ExecutionException {
    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)
  7. guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java

        // Now give the get() thread time to finish:
        assertTrue(earlyListener.wasRun.await(1, SECONDS));
    
        // Now test an additional addListener call, which will be run in-thread:
        RecordingRunnable lateListener = new RecordingRunnable();
        listenable.addListener(lateListener, directExecutor());
        assertTrue(lateListener.wasRun.await(1, SECONDS));
      }
    
      public void testAdapters_nullChecks() throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/NullCacheTest.java

    import static com.google.common.cache.TestingRemovalListeners.queuingRemovalListener;
    import static com.google.common.truth.Truth.assertThat;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.cache.CacheLoader.InvalidCacheLoadException;
    import com.google.common.cache.TestingRemovalListeners.QueuingRemovalListener;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        future.set(1);
        assertEquals(1, future.get(-1, SECONDS).intValue());
      }
    
      @J2ktIncompatible
      @GwtIncompatible // threads
      public void testOverflowTimeout() throws Exception {
        // First, sanity check that naive multiplication would really overflow to a negative number:
        long nanosPerSecond = NANOSECONDS.convert(1, SECONDS);
        assertThat(nanosPerSecond * Long.MAX_VALUE).isLessThan(0L);
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

        assertEquals(3L, countDownLatch.getCount());
    
        list.execute();
    
        // Verify that all of the runnables execute in a reasonable amount of time.
        assertTrue(countDownLatch.await(1L, TimeUnit.SECONDS));
      }
    
      public void testExecute_idempotent() {
        final AtomicInteger runCalled = new AtomicInteger();
        list.add(
            new Runnable() {
              @Override
              public void run() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 4.7K bytes
    - Viewed (0)
Back to top