Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 41 for Dickert (0.15 sec)

  1. guava-tests/test/com/google/common/base/StopwatchJavaTimeTest.java

    @GwtIncompatible
    public class StopwatchJavaTimeTest extends TestCase {
      private final FakeTicker ticker = new FakeTicker();
      private final Stopwatch stopwatch = new Stopwatch(ticker);
    
      public void testElapsed_duration() {
        stopwatch.start();
        ticker.advance(999999);
        assertEquals(Duration.ofNanos(999999), stopwatch.elapsed());
        ticker.advance(1);
        assertEquals(Duration.ofMillis(1), stopwatch.elapsed());
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu May 04 09:41:29 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java

      }
    
      public void testExpireAfterAccess() {
        final Cache<Integer, Integer> cache =
            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));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 15K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/cache/CacheBuilder.java

       * @throws IllegalStateException if a ticker was already set
       */
      @CanIgnoreReturnValue
      public CacheBuilder<K, V> ticker(Ticker ticker) {
        checkState(this.ticker == null);
        this.ticker = checkNotNull(ticker);
        return this;
      }
    
      Ticker getTicker(boolean recordsTime) {
        if (ticker != null) {
          return ticker;
        }
        return recordsTime ? Ticker.systemTicker() : NULL_TICKER;
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/cache/CacheTesting.java

        checkNotNull(ticker);
        expireEntries(toLocalCache(cache), expiringTime, ticker);
      }
    
      static void expireEntries(LocalCache<?, ?> cchm, long expiringTime, FakeTicker ticker) {
    
        for (Segment<?, ?> segment : cchm.segments) {
          drainRecencyQueue(segment);
        }
    
        ticker.advance(2 * expiringTime, TimeUnit.MILLISECONDS);
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/cache/LocalCache.java

          this.maxWeight = maxWeight;
          this.weigher = weigher;
          this.concurrencyLevel = concurrencyLevel;
          this.removalListener = removalListener;
          this.ticker = (ticker == Ticker.systemTicker() || ticker == NULL_TICKER) ? null : ticker;
          this.loader = loader;
        }
    
        CacheBuilder<K, V> recreateCacheBuilder() {
          CacheBuilder<K, V> builder =
              CacheBuilder.newBuilder()
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 144.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

        assertEquals("valueStrength", a.valueStrength, b.valueStrength);
        assertEquals("statsCounterSupplier", a.statsCounterSupplier, b.statsCounterSupplier);
        assertEquals("ticker", a.ticker, b.ticker);
        assertEquals("recordStats", a.isRecordingStats(), b.isRecordingStats());
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 19.2K bytes
    - Viewed (0)
  7. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

              .put(com.google.common.base.Optional.class, com.google.common.base.Optional.absent())
              .put(Predicate.class, Predicates.alwaysTrue())
              .put(Equivalence.class, Equivalence.equals())
              .put(Ticker.class, Ticker.systemTicker())
              .put(Stopwatch.class, Stopwatch.createUnstarted())
              // io types
              .put(InputStream.class, new ByteArrayInputStream(new byte[0]))
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 21K bytes
    - Viewed (1)
  8. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

              .put(com.google.common.base.Optional.class, com.google.common.base.Optional.absent())
              .put(Predicate.class, Predicates.alwaysTrue())
              .put(Equivalence.class, Equivalence.equals())
              .put(Ticker.class, Ticker.systemTicker())
              .put(Stopwatch.class, Stopwatch.createUnstarted())
              // io types
              .put(InputStream.class, new ByteArrayInputStream(new byte[0]))
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

      }
    
      public void testTicker_setTwice() {
        Ticker testTicker = Ticker.systemTicker();
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().ticker(testTicker);
        try {
          // even to the same instance is not allowed
          builder.ticker(testTicker);
          fail();
        } catch (IllegalStateException expected) {
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  10. android/guava-testlib/test/com/google/common/testing/FreshValueGeneratorTest.java

    import com.google.common.base.Equivalence;
    import com.google.common.base.Function;
    import com.google.common.base.Joiner;
    import com.google.common.base.Predicate;
    import com.google.common.base.Splitter;
    import com.google.common.base.Ticker;
    import com.google.common.collect.ArrayListMultimap;
    import com.google.common.collect.BiMap;
    import com.google.common.collect.HashBasedTable;
    import com.google.common.collect.HashBiMap;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 17.2K bytes
    - Viewed (0)
Back to top