Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 343 for second (0.18 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. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        lock2 = factory2.newReentrantLock(MyOrder.SECOND);
        lock3 = factory2.newReentrantLock(MyOrder.THIRD);
    
        CycleDetectingLockFactory.WithExplicitOrdering<OtherOrder> factory3 =
            newInstanceWithExplicitOrdering(OtherOrder.class, Policies.THROW);
        lock01 = factory3.newReentrantLock(OtherOrder.FIRST);
        lock02 = factory3.newReentrantLock(OtherOrder.SECOND);
        lock03 = factory3.newReentrantLock(OtherOrder.THIRD);
      }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/ObjectArrays.java

       * @param second the second array of elements to concatenate
       * @param type the component type of the returned array
       */
      @GwtIncompatible // Array.newInstance(Class, int)
      public static <T extends @Nullable Object> T[] concat(
          T[] first, T[] second, Class<@NonNull T> type) {
        T[] result = newArray(type, first.length + second.length);
        System.arraycopy(first, 0, result, 0, first.length);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Jun 12 15:59:22 GMT 2023
    - 9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/eventbus/ReentrantEventsTest.java

      static final String FIRST = "one";
      static final Double SECOND = 2.0d;
    
      final EventBus bus = new EventBus();
    
      public void testNoReentrantEvents() {
        ReentrantEventsHater hater = new ReentrantEventsHater();
        bus.register(hater);
    
        bus.post(FIRST);
    
        assertEquals(
            "ReentrantEventHater expected 2 events",
            Lists.<Object>newArrayList(FIRST, SECOND),
            hater.eventsReceived);
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.5K bytes
    - Viewed (0)
  6. src/test/java/jcifs/tests/FileAttributesTest.java

                    f.setLastModified(time);
    
                    if ( ( getContext().getConfig().getCapabilities() & SmbConstants.CAP_NT_SMBS ) == 0 ) {
                        // only have second precision
                        // there seems to be some random factor (adding one second)
                        int diff = Math.abs((int) ( ( time / 1000 ) - ( f.lastModified() / 1000 ) ));
                        Assert.assertTrue("Have set time correctly", diff < 2);
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Thu Jan 05 13:09:03 GMT 2023
    - 12.3K bytes
    - Viewed (0)
  7. guava-testlib/test/com/google/common/testing/NullPointerTesterTest.java

        public void normalNormal(String first, Integer second) {
          reactToNullParameters(first, second);
        }
    
        /** Two-arg method with the second param Nullable. */
        @SuppressWarnings("GoodTime") // false positive; b/122617528
        public void normalNullable(String first, @Nullable Integer second) {
          reactToNullParameters(first, second);
        }
    
        /** Two-arg method with the first param Nullable. */
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 47.9K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/collect/TreeMultimapExplicitTest.java

        public int compare(@Nullable String first, @Nullable String second) {
          if (first == second) {
            return 0;
          } else if (first == null) {
            return -1;
          } else if (second == null) {
            return 1;
          } else if (first.length() != second.length()) {
            return first.length() - second.length();
          } else {
            return first.compareTo(second);
          }
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/AbstractIteratorTest.java

    @ElementTypesAreNonnullByDefault
    public class AbstractIteratorTest extends TestCase {
    
      public void testDefaultBehaviorOfNextAndHasNext() {
    
        // This sample AbstractIterator returns 0 on the first call, 1 on the
        // second, then signals that it's reached the end of the data
        Iterator<Integer> iter =
            new AbstractIterator<Integer>() {
              private int rep;
    
              @Override
              public @Nullable Integer computeNext() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

          }
        }
      }
    
      /* Half of a 1-second timeout in nanoseconds */
      private static final long HALF_SECOND_NANOS = NANOSECONDS.convert(1L, SECONDS) / 2;
    
      public void testShutdownAndAwaitTermination_immediateShutdown() throws Exception {
        ExecutorService service = Executors.newSingleThreadExecutor();
        assertTrue(shutdownAndAwaitTermination(service, 1L, SECONDS));
        assertTrue(service.isTerminated());
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (3)
Back to top