Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for systemTicker (0.21 sec)

  1. android/guava/src/com/google/common/base/Ticker.java

      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;
      }
    
      private static final Ticker SYSTEM_TICKER =
          new Ticker() {
            @Override
            @SuppressWarnings("GoodTime") // reading system time without TimeSource
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue May 23 23:27:53 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  2. guava/src/com/google/common/base/Ticker.java

      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;
      }
    
      private static final Ticker SYSTEM_TICKER =
          new Ticker() {
            @Override
            @SuppressWarnings("GoodTime") // reading system time without TimeSource
    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)
  3. 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");
      }
    
      /**
       * Returns {@code true} if {@link #start()} has been called on this stopwatch, and {@link #stop()}
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 23 15:09:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  4. 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");
      }
    
      /**
       * Returns {@code true} if {@link #start()} has been called on this stopwatch, and {@link #stop()}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Nov 15 21:38:09 GMT 2022
    - 8.5K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        assertThrows(IllegalStateException.class, () -> builder.refreshAfterWrite(3600, SECONDS));
      }
    
      public void testTicker_setTwice() {
        Ticker testTicker = Ticker.systemTicker();
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().ticker(testTicker);
        try {
          // even to the same instance is not allowed
          builder.ticker(testTicker);
          fail();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        assertThrows(
            IllegalStateException.class,
            () -> builder.refreshAfterWrite(java.time.Duration.ofSeconds(3600)));
      }
    
      public void testTicker_setTwice() {
        Ticker testTicker = Ticker.systemTicker();
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().ticker(testTicker);
        try {
          // even to the same instance is not allowed
          builder.ticker(testTicker);
          fail();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 25.5K bytes
    - Viewed (0)
  7. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

                0.75f,
                (builder.maximumSize != UNSET_INT),
                builder.maximumSize,
                statsCounter,
                removalListener);
    
        this.ticker = firstNonNull(builder.ticker, Ticker.systemTicker());
      }
    
      @Override
      public int size() {
        return cachingHashMap.size();
      }
    
      @Override
      public boolean isEmpty() {
        return cachingHashMap.isEmpty();
      }
    
      @Override
    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)
  8. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

              .put(Predicate.class, Predicates.alwaysTrue())
              .put(Equivalence.class, Equivalence.equals())
              .put(Ticker.class, Ticker.systemTicker())
              .put(Stopwatch.class, Stopwatch.createUnstarted())
              // io types
              .put(InputStream.class, new ByteArrayInputStream(new byte[0]))
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 21K bytes
    - Viewed (1)
  9. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

              .put(Predicate.class, Predicates.alwaysTrue())
              .put(Equivalence.class, Equivalence.equals())
              .put(Ticker.class, Ticker.systemTicker())
              .put(Stopwatch.class, Stopwatch.createUnstarted())
              // io types
              .put(InputStream.class, new ByteArrayInputStream(new byte[0]))
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  10. guava/src/com/google/common/cache/CacheBuilder.java

        this.ticker = checkNotNull(ticker);
        return this;
      }
    
      Ticker getTicker(boolean recordsTime) {
        if (ticker != null) {
          return ticker;
        }
        return recordsTime ? Ticker.systemTicker() : NULL_TICKER;
      }
    
      /**
       * Specifies a listener instance that caches should notify each time an entry is removed for any
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 51.3K bytes
    - Viewed (0)
Back to top