Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for doSetRate (0.1 sec)

  1. guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java

        super(stopwatch);
      }
    
      @Override
      final void doSetRate(double permitsPerSecond, long nowMicros) {
        resync(nowMicros);
        double stableIntervalMicros = SECONDS.toMicros(1L) / permitsPerSecond;
        this.stableIntervalMicros = stableIntervalMicros;
        doSetRate(permitsPerSecond, stableIntervalMicros);
      }
    
      abstract void doSetRate(double permitsPerSecond, double stableIntervalMicros);
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Apr 04 09:45:04 UTC 2023
    - 19.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/RateLimiter.java

       */
      public final void setRate(double permitsPerSecond) {
        checkArgument(permitsPerSecond > 0.0, "rate must be positive");
        synchronized (mutex()) {
          doSetRate(permitsPerSecond, stopwatch.readMicros());
        }
      }
    
      abstract void doSetRate(double permitsPerSecond, long nowMicros);
    
      /**
       * Returns the stable rate (as {@code permits per seconds}) with which this {@code RateLimiter} is
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/RateLimiter.java

       */
      public final void setRate(double permitsPerSecond) {
        checkArgument(permitsPerSecond > 0.0, "rate must be positive");
        synchronized (mutex()) {
          doSetRate(permitsPerSecond, stopwatch.readMicros());
        }
      }
    
      abstract void doSetRate(double permitsPerSecond, long nowMicros);
    
      /**
       * Returns the stable rate (as {@code permits per seconds}) with which this {@code RateLimiter} is
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

            events.clear();
          }
        }
    
        @Override
        public String toString() {
          return events.toString();
        }
      }
    
      @AndroidIncompatible // Mockito loses its ability to mock doGetRate as of Android 21
      public void testMockingMockito() throws Exception {
        RateLimiter mock = Mockito.mock(RateLimiter.class);
        for (Method method : RateLimiter.class.getMethods()) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

            events.clear();
          }
        }
    
        @Override
        public String toString() {
          return events.toString();
        }
      }
    
      @AndroidIncompatible // Mockito loses its ability to mock doGetRate as of Android 21
      public void testMockingMockito() throws Exception {
        RateLimiter mock = Mockito.mock(RateLimiter.class);
        for (Method method : RateLimiter.class.getMethods()) {
    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