Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 117 for pickers (0.28 sec)

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

      public void testAutoRefresh() {
        FakeTicker ticker = new FakeTicker();
        IncrementingLoader loader = incrementingLoader();
        LoadingCache<Integer, Integer> cache =
            CacheBuilder.newBuilder()
                .refreshAfterWrite(3, MILLISECONDS)
                .expireAfterWrite(6, MILLISECONDS)
                .lenientParsing()
                .ticker(ticker)
                .build(loader);
        int expectedLoads = 0;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.9K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/testing/FakeTicker.java

    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.base.Ticker;
    import com.google.errorprone.annotations.CanIgnoreReturnValue;
    import java.time.Duration;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.atomic.AtomicLong;
    
    /**
     * A Ticker whose value can be advanced programmatically in test.
     *
     * <p>The ticker can be configured so that the time is incremented whenever {@link #read} is called:
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 13 18:17:09 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  3. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

      private static class Timestamped<V> {
        private final V value;
        private final Ticker ticker;
        private long writeTimestamp;
        private long accessTimestamp;
    
        public Timestamped(V value, Ticker ticker) {
          this.value = checkNotNull(value);
          this.ticker = checkNotNull(ticker);
          this.writeTimestamp = ticker.read();
          this.accessTimestamp = this.writeTimestamp;
        }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 27 19:19:19 GMT 2024
    - 21.6K bytes
    - Viewed (0)
  5. 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)
  6. guava-tests/test/com/google/common/cache/CacheLoadingTest.java

                return Futures.immediateFuture(two);
              }
            };
    
        LoadingCache<Object, Object> cache =
            CacheBuilder.newBuilder()
                .recordStats()
                .ticker(ticker)
                .refreshAfterWrite(1, MILLISECONDS)
                .build(loader);
        Object key = new Object();
        CacheStats stats = cache.stats();
        assertEquals(0, stats.missCount());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 86.2K bytes
    - Viewed (0)
  7. doc/next/6-stdlib/1-time.md

    [time.Timer] and [time.Ticker].
    
    First, `Timer`s and `Ticker`s that are no longer referred to by the program
    become eligible for garbage collection immediately, even if their
    `Stop` methods have not been called.
    Earlier versions of Go did not collect unstopped `Timer`s until after
    they had fired and never collected unstopped `Ticker`s.
    
    Second, the timer channel associated with a `Timer` or `Ticker` is
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Apr 12 20:57:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  8. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 15K bytes
    - Viewed (0)
  9. cmd/namespace-lock.go

    // volume, path and operation ID.
    func (n *nsLockMap) NewNSLock(lockers func() ([]dsync.NetLocker, string), volume string, paths ...string) RWLocker {
    	opsID := mustGetUUID()
    	if n.isDistErasure {
    		drwmutex := dsync.NewDRWMutex(&dsync.Dsync{
    			GetLockers: lockers,
    			Timeouts:   dsync.DefaultTimeouts,
    		}, pathsJoinPrefix(volume, paths...)...)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  10. android/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 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 16.7K bytes
    - Viewed (0)
Back to top