Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 74 for duration (0.23 sec)

  1. android/guava-tests/test/com/google/common/cache/CacheBuilderFactory.java

      }
    
      static class DurationSpec {
        private final long duration;
        private final TimeUnit unit;
    
        private DurationSpec(long duration, TimeUnit unit) {
          this.duration = duration;
          this.unit = unit;
        }
    
        public static DurationSpec of(long duration, TimeUnit unit) {
          return new DurationSpec(duration, unit);
        }
    
        @Override
        public int hashCode() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        }
      }
    
      @GwtIncompatible // java.time.Duration
      public void testTimeToLive_setTwice_duration() {
        CacheBuilder<Object, Object> builder =
            CacheBuilder.newBuilder().expireAfterWrite(java.time.Duration.ofSeconds(3600));
        assertThrows(
            IllegalStateException.class,
            () -> builder.expireAfterWrite(java.time.Duration.ofSeconds(3600)));
      }
    
      public void testTimeToIdle_negative() {
    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)
  3. guava/src/com/google/common/cache/CacheBuilderSpec.java

     *   <li>{@code maximumWeight=[long]}: sets {@link CacheBuilder#maximumWeight}.
     *   <li>{@code expireAfterAccess=[duration]}: sets {@link CacheBuilder#expireAfterAccess}.
     *   <li>{@code expireAfterWrite=[duration]}: sets {@link CacheBuilder#expireAfterWrite}.
     *   <li>{@code refreshAfterWrite=[duration]}: sets {@link CacheBuilder#refreshAfterWrite}.
     *   <li>{@code weakKeys}: sets {@link CacheBuilder#weakKeys}.
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Aug 22 14:27:44 GMT 2022
    - 18.1K bytes
    - Viewed (0)
  4. guava-testlib/test/com/google/common/testing/FakeTickerTest.java

        assertEquals(6000000000L, ticker.read());
      }
    
      @GwtIncompatible // java.time.Duration
      @SuppressWarnings("Java7ApiChecker") // guava-android can rely on library desugaring now.
      public void testAutoIncrementStep_duration() {
        FakeTicker ticker = new FakeTicker().setAutoIncrementStep(Duration.ofMillis(1));
        assertEquals(0, ticker.read());
        assertEquals(1000000, ticker.read());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 14:40:46 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/base/SuppliersTest.java

        }
      }
    
      @SuppressWarnings("Java7ApiChecker") // test of Java 8+ API
      @J2ktIncompatible // Duration
      @GwtIncompatible // Duration
      public void testMemoizeWithExpiration_durationNegative() throws InterruptedException {
        try {
          Supplier<String> unused = Suppliers.memoizeWithExpiration(() -> "", Duration.ZERO);
          fail();
        } catch (IllegalArgumentException expected) {
        }
    
        try {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/base/SuppliersTest.java

        }
      }
    
      @SuppressWarnings("Java7ApiChecker") // test of Java 8+ API
      @J2ktIncompatible // Duration
      @GwtIncompatible // Duration
      public void testMemoizeWithExpiration_durationNegative() throws InterruptedException {
        try {
          Supplier<String> unused = Suppliers.memoizeWithExpiration(() -> "", Duration.ZERO);
          fail();
        } catch (IllegalArgumentException expected) {
        }
    
        try {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 18.1K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/cache/CacheBuilderFactory.java

      }
    
      static class DurationSpec {
        private final long duration;
        private final TimeUnit unit;
    
        private DurationSpec(long duration, TimeUnit unit) {
          this.duration = duration;
          this.unit = unit;
        }
    
        public static DurationSpec of(long duration, TimeUnit unit) {
          return new DurationSpec(duration, unit);
        }
    
        @Override
        public int hashCode() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/base/Suppliers.java

      @GwtIncompatible // java.time.Duration
      @SuppressWarnings("Java7ApiChecker") // no more dangerous that wherever the user got the Duration
      @IgnoreJRERequirement
      public static <T extends @Nullable Object> Supplier<T> memoizeWithExpiration(
          Supplier<T> delegate, Duration duration) {
        checkNotNull(delegate);
        // The alternative of `duration.compareTo(Duration.ZERO) > 0` causes J2ObjC trouble.
        checkArgument(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 15.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

       * uninterruptibly.
       */
      @J2ktIncompatible
      @GwtIncompatible // concurrency
      @SuppressWarnings("GoodTime") // should accept a java.time.Duration
      public static boolean awaitUninterruptibly(CountDownLatch latch, long timeout, TimeUnit unit) {
        boolean interrupted = false;
        try {
          long remainingNanos = unit.toNanos(timeout);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 14.4K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/testing/FakeTicker.java

      public FakeTicker advance(Duration duration) {
        return advance(duration.toNanos());
      }
    
      /**
       * Sets the increment applied to the ticker whenever it is queried.
       *
       * <p>The default behavior is to auto increment by zero. i.e: The ticker is left unchanged when
       * queried.
       */
      @SuppressWarnings("GoodTime") // should accept a java.time.Duration
      @CanIgnoreReturnValue
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 13 18:17:09 GMT 2024
    - 4.2K bytes
    - Viewed (0)
Back to top