Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 162 for amount (0.2 sec)

  1. android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

       * returns the expected data.
       *
       * @throws Throwable if the listener isn't called or if it resulted in a throwable or if the
       *     result doesn't match the expected value.
       */
      public void assertSuccess(Object expectedData) throws Throwable {
        // Verify that the listener executed in a reasonable amount of time.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 12 18:12:42 GMT 2023
    - 3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/TestThread.java

      }
    
      /**
       * Sends the given method call to this thread.
       *
       * @throws TimeoutException if this thread does not accept the request within a reasonable amount
       *     of time
       */
      private void sendRequest(String methodName, Object... arguments) throws Exception {
        if (!requestQueue.offer(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

        list.add(new MockRunnable(countDownLatch), exec);
        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() {
    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)
  4. android/guava-testlib/src/com/google/common/testing/FakeTicker.java

      @CanIgnoreReturnValue
      public FakeTicker setAutoIncrementStep(long autoIncrementStep, TimeUnit timeUnit) {
        checkArgument(autoIncrementStep >= 0, "May not auto-increment by a negative amount");
        this.autoIncrementStepNanos = timeUnit.toNanos(autoIncrementStep);
        return this;
      }
    
      /**
       * Sets the increment applied to the ticker whenever it is queried.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 13 18:17:09 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/RateLimiter.java

          return doGetRate();
        }
      }
    
      abstract double doGetRate();
    
      /**
       * Acquires a single permit from this {@code RateLimiter}, blocking until the request can be
       * granted. Tells the amount of time slept, if any.
       *
       * <p>This method is equivalent to {@code acquire(1)}.
       *
       * @return time spent sleeping to enforce rate, in seconds; 0.0 if not rate-limited
    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)
  6. guava-tests/benchmark/com/google/common/primitives/UnsignedLongsBenchmark.java

        }
        return tmp;
      }
    
      @Benchmark
      long parseUnsignedLong(int reps) {
        long tmp = 0;
        // Given that we make three calls per pass, we scale reps down in order
        // to do a comparable amount of work to other measurements.
        int scaledReps = reps / 3 + 1;
        for (int i = 0; i < scaledReps; i++) {
          int j = i & ARRAY_MASK;
          tmp += UnsignedLongs.parseUnsignedLong(decimalStrings[j]);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.3K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

        }
      }
    
      /**
       * This neat test shows that no matter what weights we use in our requests, if we push X amount of
       * permits in a cool state, where X = rate * timeToCoolDown, and we have specified a
       * timeToWarmUp() period, it will cost as the prescribed amount of time. E.g., calling
       * [acquire(5), acquire(1)] takes exactly the same time as [acquire(2), acquire(3), acquire(1)].
       */
    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)
  8. android/guava/src/com/google/common/util/concurrent/SmoothRateLimiter.java

       * "expected arrival time of the next request" is actually in the past, then the difference (now -
       * past) is the amount of time that the RateLimiter was formally unused, and it is that amount of
       * time which we translate to storedPermits. (We increase storedPermits with the amount of permits
       * that would have been produced in that idle time). So, if rate == 1 permit per second, and
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 19.3K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/TestThread.java

      }
    
      /**
       * Sends the given method call to this thread.
       *
       * @throws TimeoutException if this thread does not accept the request within a reasonable amount
       *     of time
       */
      private void sendRequest(String methodName, Object... arguments) throws Exception {
        if (!requestQueue.offer(
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  10. guava-testlib/src/com/google/common/testing/FakeTicker.java

      @CanIgnoreReturnValue
      public FakeTicker setAutoIncrementStep(long autoIncrementStep, TimeUnit timeUnit) {
        checkArgument(autoIncrementStep >= 0, "May not auto-increment by a negative amount");
        this.autoIncrementStepNanos = timeUnit.toNanos(autoIncrementStep);
        return this;
      }
    
      /**
       * Sets the increment applied to the ticker whenever it is queried.
       *
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 14:40:46 GMT 2024
    - 3.5K bytes
    - Viewed (0)
Back to top