- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,374 for Ticker (0.28 sec)
-
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; }
Registered: 2024-06-12 16:38 - Last Modified: 2023-05-23 23:27 - 1.8K bytes - Viewed (0) -
android/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; }
Registered: 2024-06-12 16:38 - Last Modified: 2023-05-23 23:27 - 1.8K bytes - Viewed (0) -
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, TimeUnit.MILLISECONDS); assertEquals(1000010L, ticker.read()); ticker.advance(Duration.ofMillis(1)); assertEquals(2000010L, ticker.read()); }
Registered: 2024-06-12 16:38 - Last Modified: 2024-02-06 14:40 - 6.3K 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: 2024-06-12 16:38 - Last Modified: 2024-02-09 15:49 - 5.8K bytes - Viewed (0) -
src/time/tick.go
// Note: The runtime knows the layout of struct Ticker, since newTimer allocates it. // Note also that Ticker and Timer have the same layout, so that newTimer can handle both. // The initTimer and initTicker fields are named differently so that // users cannot convert between the two without unsafe. // A Ticker holds a channel that delivers “ticks” of a clock // at intervals. type Ticker struct {
Registered: 2024-06-12 16:32 - Last Modified: 2024-04-04 14:21 - 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, TimeUnit.MILLISECONDS); assertEquals(1000010L, ticker.read()); ticker.advance(Duration.ofMillis(1)); assertEquals(2000010L, ticker.read()); }
Registered: 2024-06-12 16:38 - Last Modified: 2024-02-06 14:40 - 6.4K bytes - Viewed (0) -
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();
Registered: 2024-06-12 16:38 - Last Modified: 2022-08-05 17:21 - 18.7K bytes - Viewed (0) -
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: 2024-06-12 16:38 - Last Modified: 2024-02-06 14:40 - 3.5K 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: 2024-06-12 16:38 - Last Modified: 2024-03-13 18:17 - 4.2K bytes - Viewed (0) -
android/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: 2024-06-12 16:38 - Last Modified: 2022-11-15 21:38 - 8.5K bytes - Viewed (0)