- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for FakeTicker (0.17 sec)
-
guava-testlib/src/com/google/common/testing/FakeTicker.java
@ElementTypesAreNonnullByDefault @GwtCompatible public class FakeTicker extends Ticker { private final AtomicLong nanos = new AtomicLong(); private volatile long autoIncrementStepNanos; /** Advances the ticker value by {@code time} in {@code timeUnit}. */ @SuppressWarnings("GoodTime") // should accept a java.time.Duration @CanIgnoreReturnValue public FakeTicker advance(long time, TimeUnit timeUnit) {
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/src/com/google/common/testing/FakeTicker.java
@ElementTypesAreNonnullByDefault @GwtCompatible public class FakeTicker extends Ticker { private final AtomicLong nanos = new AtomicLong(); private volatile long autoIncrementStepNanos; /** Advances the ticker value by {@code time} in {@code timeUnit}. */ @SuppressWarnings("GoodTime") // should accept a java.time.Duration @CanIgnoreReturnValue public FakeTicker advance(long time, TimeUnit timeUnit) {
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-testlib/test/com/google/common/testing/FakeTickerTest.java
assertEquals(2000010L, ticker.read()); } public void testAutoIncrementStep_returnsSameInstance() { FakeTicker ticker = new FakeTicker(); assertSame(ticker, ticker.setAutoIncrementStep(10, NANOSECONDS)); } public void testAutoIncrementStep_nanos() { FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, NANOSECONDS); assertEquals(0, ticker.read()); assertEquals(10, ticker.read());
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/cache/CacheBuilderGwtTest.java
* * @author Jon Donovan */ @GwtCompatible public class CacheBuilderGwtTest extends TestCase { private FakeTicker fakeTicker; @Override protected void setUp() throws Exception { super.setUp(); fakeTicker = new FakeTicker(); } public void testLoader() throws ExecutionException { final Cache<Integer, Integer> cache = CacheBuilder.newBuilder().build();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 14.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/StopwatchTest.java
import com.google.common.annotations.J2ktIncompatible; import com.google.common.testing.FakeTicker; import junit.framework.TestCase; /** * Unit test for {@link Stopwatch}. * * @author Kevin Bourrillion */ @GwtCompatible public class StopwatchTest extends TestCase { private final FakeTicker ticker = new FakeTicker(); private final Stopwatch stopwatch = new Stopwatch(ticker);
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-tests/test/com/google/common/base/StopwatchJavaTimeTest.java
import com.google.common.annotations.J2ktIncompatible; import com.google.common.testing.FakeTicker; import java.time.Duration; import junit.framework.TestCase; /** Unit test for the {@code java.time} support in {@link Stopwatch}. */ @J2ktIncompatible @GwtIncompatible public class StopwatchJavaTimeTest extends TestCase { private final FakeTicker ticker = new FakeTicker(); private final Stopwatch stopwatch = new Stopwatch(ticker);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu May 04 09:41:29 UTC 2023 - 1.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheRefreshTest.java
import com.google.common.cache.TestingCacheLoaders.IncrementingLoader; import com.google.common.testing.FakeTicker; import junit.framework.TestCase; /** * Tests relating to automatic cache refreshing. * * @author Charles Fry */ public class CacheRefreshTest extends TestCase { public void testAutoRefresh() { FakeTicker ticker = new FakeTicker(); IncrementingLoader loader = incrementingLoader();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/StopwatchTest.java
import com.google.common.annotations.J2ktIncompatible; import com.google.common.testing.FakeTicker; import junit.framework.TestCase; /** * Unit test for {@link Stopwatch}. * * @author Kevin Bourrillion */ @GwtCompatible public class StopwatchTest extends TestCase { private final FakeTicker ticker = new FakeTicker(); private final Stopwatch stopwatch = new Stopwatch(ticker);
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/cache/CacheLoadingTest.java
assertEquals(1, stats.hitCount()); } public void testRefresh() { final Object one = new Object(); final Object two = new Object(); FakeTicker ticker = new FakeTicker(); CacheLoader<Object, Object> loader = new CacheLoader<Object, Object>() { @Override public Object load(Object key) { return one; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 86.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/LocalCacheTest.java
makeLocalCache(createCacheBuilder().refreshAfterWrite(duration, unit)); assertEquals(unit.toNanos(duration), map.refreshNanos); } public void testLongAsyncRefresh() throws Exception { FakeTicker ticker = new FakeTicker(); CountDownLatch reloadStarted = new CountDownLatch(1); SettableFuture<Thread> threadAboutToBlockForRefresh = SettableFuture.create();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:07:49 UTC 2024 - 110.6K bytes - Viewed (0)