Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for testSimpleWeights (0.07 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

        stopwatch.sleepMillis(900);
        assertFalse(limiter.tryAcquire(1, Long.MIN_VALUE, SECONDS));
        stopwatch.sleepMillis(100);
        assertTrue(limiter.tryAcquire(1, -1, SECONDS));
      }
    
      public void testSimpleWeights() {
        RateLimiter rateLimiter = RateLimiter.create(1.0, stopwatch);
        rateLimiter.acquire(1); // no wait
        rateLimiter.acquire(1); // R1.00, to repay previous
        rateLimiter.acquire(2); // R1.00, to repay previous
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

        stopwatch.sleepMillis(900);
        assertFalse(limiter.tryAcquire(1, Long.MIN_VALUE, SECONDS));
        stopwatch.sleepMillis(100);
        assertTrue(limiter.tryAcquire(1, -1, SECONDS));
      }
    
      public void testSimpleWeights() {
        RateLimiter rateLimiter = RateLimiter.create(1.0, stopwatch);
        rateLimiter.acquire(1); // no wait
        rateLimiter.acquire(1); // R1.00, to repay previous
        rateLimiter.acquire(2); // R1.00, to repay previous
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 21.8K bytes
    - Viewed (0)
Back to top