Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 62 for ticket (0.15 sec)

  1. android/guava/src/com/google/common/util/concurrent/RateLimiter.java

     * permits per second:
     *
     * <pre>{@code
     * final RateLimiter rateLimiter = RateLimiter.create(5000.0); // rate = 5000 permits per second
     * void submitPacket(byte[] packet) {
     *   rateLimiter.acquire(packet.length);
     *   networkService.send(packet);
     * }
     * }</pre>
     *
     * <p>It is important to note that the number of permits requested <i>never</i> affects 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/cache/CacheExpirationTest.java

                .expireAfterWrite(EXPIRING_TIME, MILLISECONDS)
                .removalListener(removalListener)
                .ticker(ticker)
                .build(loader);
        checkExpiration(cache, loader, ticker, removalListener);
      }
    
      public void testExpiration_expireAfterAccess() {
        FakeTicker ticker = new FakeTicker();
        CountingRemovalListener<String, Integer> removalListener = countingRemovalListener();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 18.7K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/base/StopwatchTest.java

      }
    
      public void testElapsed_notRunning() {
        ticker.advance(1);
        stopwatch.start();
        ticker.advance(4);
        stopwatch.stop();
        ticker.advance(9);
        assertEquals(4, stopwatch.elapsed(NANOSECONDS));
      }
    
      public void testElapsed_multipleSegments() {
        stopwatch.start();
        ticker.advance(9);
        stopwatch.stop();
    
        ticker.advance(16);
    
        stopwatch.start();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  4. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 13 18:17:09 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  5. 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)
  6. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 86.2K bytes
    - Viewed (0)
  7. guava/src/com/google/common/base/Ticker.java

    @ElementTypesAreNonnullByDefault
    public abstract class Ticker {
      /** Constructor for use by subclasses. */
      protected Ticker() {}
    
      /** Returns the number of nanoseconds elapsed since this ticker's fixed point of reference. */
      public abstract long read();
    
      /**
       * A ticker that reads the current time using {@link System#nanoTime}.
       *
       * @since 10.0
       */
      public static Ticker systemTicker() {
        return SYSTEM_TICKER;
      }
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue May 23 23:27:53 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/HashBiMap.java

      transient int modCount;
      /** Maps a bucket to the "entry" of its first element. */
      private transient int[] hashTableKToV;
      /** Maps a bucket to the "entry" of its first element. */
      private transient int[] hashTableVToK;
      /** Maps an "entry" to the "entry" that follows it in its bucket. */
      private transient int[] nextInBucketKToV;
      /** Maps an "entry" to the "entry" that follows it in its bucket. */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 06 16:06:58 GMT 2023
    - 36.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/LinkedHashMultimap.java

              int bucket = valueEntry.smearedValueHash & mask;
              valueEntry.nextInValueBucket = hashTable[bucket];
              hashTable[bucket] = valueEntry;
            }
          }
        }
    
        @CanIgnoreReturnValue
        @Override
        public boolean remove(@CheckForNull Object o) {
          int smearedHash = Hashing.smearedHash(o);
          int bucket = smearedHash & mask();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 23.6K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/testing/FreshValueGenerator.java

          @Override
          public String toString() {
            return string;
          }
        };
      }
    
      @Generates
      Ticker generateTicker() {
        return new Ticker() {
          @Override
          public long read() {
            return 0;
          }
    
          final String string = paramString(Ticker.class, generateInt());
    
          @Override
          public String toString() {
            return string;
          }
        };
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 28K bytes
    - Viewed (0)
Back to top