Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 201 for duration (0.19 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/src/com/google/common/cache/CacheBuilder.java

      @SuppressWarnings("GoodTime") // duration decomposition
      private static long toNanosSaturated(java.time.Duration duration) {
        // Using a try/catch seems lazy, but the catch block will rarely get invoked (except for
        // durations longer than approximately +/- 292 years).
        try {
          return duration.toNanos();
        } catch (ArithmeticException tooBig) {
    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)
  3. 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)
  4. guava-testlib/src/com/google/common/testing/FakeTicker.java

        return this;
      }
    
      /**
       * Advances the ticker value by {@code duration}.
       *
       * @since 28.0
       */
      @GwtIncompatible
      @J2ktIncompatible
      @CanIgnoreReturnValue
      @SuppressWarnings("Java7ApiChecker") // guava-android can rely on library desugaring now.
      public FakeTicker advance(Duration duration) {
        return advance(duration.toNanos());
      }
    
      /**
    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)
  5. cmd/os-instrumented.go

    func (o *osMetrics) time(s osMetric) func() {
    	startTime := time.Now()
    	return func() {
    		duration := time.Since(startTime)
    
    		atomic.AddUint64(&o.operations[s], 1)
    		o.latency[s].add(duration)
    	}
    }
    
    // incTime will increment time on metric s with a specific duration.
    func (o *osMetrics) incTime(s osMetric, d time.Duration) {
    	atomic.AddUint64(&o.operations[s], 1)
    	o.latency[s].add(d)
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 15 01:09:38 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  6. istioctl/pkg/metrics/metrics.go

    }
    
    func getLatency(promAPI promv1.API, workloadName, workloadNamespace string, duration time.Duration, quantile float64) (time.Duration, error) {
    	latencyQuery := fmt.Sprintf(`histogram_quantile(%f, sum(rate(%s_bucket{%s=~"%s.*", %s=~"%s.*",reporter="destination"}[%s])) by (le))`,
    		quantile, reqDur, destWorkloadLabel, workloadName, destWorkloadNamespaceLabel, workloadNamespace, duration)
    
    	letency, err := vectorValue(promAPI, latencyQuery)
    	if err != nil {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. 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 Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 15.3K bytes
    - Viewed (0)
Back to top