- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 230 for ticker (0.06 sec)
-
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:
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 3.6K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java
public void testAdvance() { FakeTicker ticker = new FakeTicker(); assertEquals(0, ticker.read()); assertSame(ticker, ticker.advance(10)); assertEquals(10, ticker.read()); ticker.advance(1, MILLISECONDS); assertEquals(1000010L, ticker.read()); ticker.advance(Duration.ofMillis(1)); assertEquals(2000010L, ticker.read()); } public void testAutoIncrementStep_returnsSameInstance() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 22 13:49:09 UTC 2024 - 6.5K bytes - Viewed (0) -
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();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 17 18:14:12 UTC 2024 - 5.7K bytes - Viewed (0) -
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();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 17 18:14:12 UTC 2024 - 5.7K bytes - Viewed (0) -
guava/src/com/google/common/base/Stopwatch.java
* * @since 15.0 */ public static Stopwatch createStarted(Ticker ticker) { return new Stopwatch(ticker).start(); } Stopwatch() { this.ticker = Ticker.systemTicker(); } Stopwatch(Ticker ticker) { this.ticker = checkNotNull(ticker, "ticker"); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 9.3K bytes - Viewed (0) -
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:
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 4.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/LocalCacheTest.java
ticker.advance(1); segment.recordRead(entry, ticker.read()); segment.expireEntries(ticker.read()); assertTrue(map.containsKey(key)); assertSame(entry, segment.accessQueue.peek()); assertEquals(1, segment.accessQueue.size()); ticker.advance(1); segment.recordRead(entry, ticker.read()); segment.expireEntries(ticker.read());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 110.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/LocalCacheTest.java
ticker.advance(1); segment.recordRead(entry, ticker.read()); segment.expireEntries(ticker.read()); assertTrue(map.containsKey(key)); assertSame(entry, segment.accessQueue.peek()); assertEquals(1, segment.accessQueue.size()); ticker.advance(1); segment.recordRead(entry, ticker.read()); segment.expireEntries(ticker.read());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 112.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheBuilderGwtTest.java
assertEquals(Integer.valueOf(6), cache.apply(7)); } public void testExpireAfterAccess() { final Cache<Integer, Integer> cache = CacheBuilder.newBuilder().expireAfterAccess(1000, MILLISECONDS).ticker(fakeTicker).build(); cache.put(0, 10); cache.put(2, 30); fakeTicker.advance(999, MILLISECONDS); assertEquals(Integer.valueOf(30), cache.getIfPresent(2));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 14.4K bytes - Viewed (0) -
cmd/bucket-replication-stats.go
mostRecentStatsMu sync.Mutex // mutex for mostRecentStats wlock sync.RWMutex // mutex for active workers movingAvgTicker *time.Ticker // Ticker for calculating moving averages wTimer *time.Ticker // ticker for calculating active workers qTimer *time.Ticker // ticker for calculating queue stats } func (r *ReplicationStats) trackEWMA() { for { select { case <-r.movingAvgTicker.C:
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 12:04:40 UTC 2024 - 13.6K bytes - Viewed (0)