Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 15 of 15 for pickers (0.19 sec)

  1. 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;
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue May 23 23:27:53 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  2. 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");
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Nov 15 21:38:09 GMT 2022
    - 8.5K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 14:40:46 GMT 2024
    - 3.5K bytes
    - Viewed (0)
Back to top