Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 244 for Milliseconds (0.29 sec)

  1. android/guava-tests/test/com/google/common/cache/CacheExpirationTest.java

        // 4 expires
        ticker.advance(1, MILLISECONDS);
        assertThat(keySet).containsExactly(6, 8, 0, 1, 2, 5, 7, 9);
        ticker.advance(1, MILLISECONDS);
        assertThat(keySet).containsExactly(6, 8, 0, 1, 2, 5, 7, 9);
    
        // 6 expires
        ticker.advance(1, MILLISECONDS);
        assertThat(keySet).containsExactly(8, 0, 1, 2, 5, 7, 9);
        ticker.advance(1, MILLISECONDS);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/cache/CacheRefreshTest.java

        IncrementingLoader loader = incrementingLoader();
        LoadingCache<Integer, Integer> cache =
            CacheBuilder.newBuilder()
                .refreshAfterWrite(3, MILLISECONDS)
                .expireAfterWrite(6, MILLISECONDS)
                .lenientParsing()
                .ticker(ticker)
                .build(loader);
        int expectedLoads = 0;
        int expectedReloads = 0;
        for (int i = 0; i < 3; i++) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java

        Stopwatch stopwatch = Stopwatch.createStarted();
    
        assertThrows(UncheckedTimeoutException.class, () -> proxy.sleepThenReturnInput("x"));
    
        assertThat(stopwatch.elapsed(MILLISECONDS)).isIn(Range.closed(NOT_ENOUGH_MS, DELAY_MS * 2));
        // Is it still computing away anyway?
        assertThat(target.finished).isFalse();
        MILLISECONDS.sleep(ENOUGH_MS);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

            CacheBuilder.newBuilder()
                .expireAfterAccess(1000, TimeUnit.MILLISECONDS)
                .ticker(fakeTicker)
                .build();
    
        cache.put(0, 10);
        cache.put(2, 30);
    
        fakeTicker.advance(999, TimeUnit.MILLISECONDS);
        assertEquals(Integer.valueOf(30), cache.getIfPresent(2));
        fakeTicker.advance(1, TimeUnit.MILLISECONDS);
        assertEquals(Integer.valueOf(30), cache.getIfPresent(2));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 15.1K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

        assertTrue(future.isCancelled());
        assertTrue(future.isDone());
    
        assertTrue(successLatch.await(200, MILLISECONDS));
        assertTrue(listenerLatch.await(200, MILLISECONDS));
    
        latch.countDown();
    
        exec.shutdown();
        exec.awaitTermination(100, MILLISECONDS);
      }
    
      /**
       * Tests that all listeners complete, even if they were added before or after the future was
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        thread.start();
        thread.join();
        assertFalse(thread.isAlive());
    
        joinUninterruptibly(thread);
        joinUninterruptibly(thread, 0, MILLISECONDS);
        joinUninterruptibly(thread, -42, MILLISECONDS);
        joinUninterruptibly(thread, LONG_DELAY_MS, MILLISECONDS);
        assertTimeNotPassed(stopwatch, LONG_DELAY_MS);
      }
    
      public void testJoinNoInterrupt() {
        TimedThread thread = TimedThread.createWithDelay(20);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 31.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/FakeTimeLimiterTest.java

                        callableThrowing(exception), DELAY_MS, TimeUnit.MILLISECONDS));
        assertThat(e.getCause()).isEqualTo(exception);
      }
    
      public void testCallUninterruptiblyWithTimeout_propagatesReturnValue() throws Exception {
        String result =
            timeLimiter.callUninterruptiblyWithTimeout(
                Callables.returning(RETURN_VALUE), DELAY_MS, TimeUnit.MILLISECONDS);
    
        assertThat(result).isEqualTo(RETURN_VALUE);
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  8. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt

            KeepOpen
          }
          else -> wrapSocketPolicy()
        }
      result.throttleBody(throttleBytesPerPeriod, getThrottlePeriod(MILLISECONDS), MILLISECONDS)
      result.bodyDelay(getBodyDelay(MILLISECONDS), MILLISECONDS)
      result.headersDelay(getHeadersDelay(MILLISECONDS), MILLISECONDS)
      return result.build()
    }
    
    private fun PushPromise.wrap(): mockwebserver3.PushPromise {
      return mockwebserver3.PushPromise(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/collect/QueuesTest.java

          Stopwatch timer = Stopwatch.createStarted();
    
          int drained = drain(q, newArrayList(), 2, 10, MILLISECONDS, interruptibly);
          assertThat(drained).isAtMost(1);
    
          assertThat(timer.elapsed(MILLISECONDS)).isAtLeast(10L);
    
          // If even the first one wasn't there, clean up so that the next test doesn't see an element.
          producerThread.cancel(true);
          producer.doneProducing.await();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

            CacheBuilder.newBuilder()
                .expireAfterAccess(1000, TimeUnit.MILLISECONDS)
                .ticker(fakeTicker)
                .build();
    
        cache.put(0, 10);
        cache.put(2, 30);
    
        fakeTicker.advance(999, TimeUnit.MILLISECONDS);
        assertEquals(Integer.valueOf(30), cache.getIfPresent(2));
        fakeTicker.advance(1, TimeUnit.MILLISECONDS);
        assertEquals(Integer.valueOf(30), cache.getIfPresent(2));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 15K bytes
    - Viewed (0)
Back to top