Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 117 for Nanoseconds (0.2 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java

    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    import static java.util.concurrent.TimeUnit.MILLISECONDS;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.util.concurrent.AbstractScheduledService.Cancellable;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  2. guava/src/com/google/common/base/Internal.java

    /** This class is for {@code com.google.common.base} use only! */
    @J2ktIncompatible
    @GwtIncompatible // java.time.Duration
    @ElementTypesAreNonnullByDefault
    final class Internal {
    
      /**
       * Returns the number of nanoseconds of the given duration without throwing or overflowing.
       *
       * <p>Instead of throwing {@link ArithmeticException}, this method silently saturates to either
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Jan 11 14:30:06 GMT 2024
    - 2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/base/Internal.java

    /** This class is for {@code com.google.common.base} use only! */
    @J2ktIncompatible
    @GwtIncompatible // java.time.Duration
    @ElementTypesAreNonnullByDefault
    final class Internal {
    
      /**
       * Returns the number of nanoseconds of the given duration without throwing or overflowing.
       *
       * <p>Instead of throwing {@link ArithmeticException}, this method silently saturates to either
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Jan 11 14:30:06 GMT 2024
    - 2K bytes
    - Viewed (0)
  4. guava-tests/benchmark/com/google/common/util/concurrent/SingleThreadAbstractFutureBenchmark.java

      @Benchmark
      public long timeGetWithSmallTimeout(long reps) throws Exception {
        Facade<?> f = notDoneFuture;
        long r = 0;
        for (int i = 0; i < reps; i++) {
          try {
            f.get(500, TimeUnit.NANOSECONDS);
            r += 1;
          } catch (TimeoutException e) {
            r += 2;
          }
        }
        return r;
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jul 16 17:22:27 GMT 2019
    - 3.6K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/AutobahnTester.kt

            }
          },
        )
    
        check(latch.await(30, TimeUnit.SECONDS)) { "Timed out waiting for test $number to finish." }
        val endNanos = System.nanoTime()
        val tookMs = TimeUnit.NANOSECONDS.toMillis(endNanos - startNanos.get())
        println("Took ${tookMs}ms")
      }
    
      private fun getTestCount(): Long {
        val latch = CountDownLatch(1)
        val countRef = AtomicLong()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/cache/AbstractCache.java

         * an entry to be loaded, and the loading completes successfully. In contrast to {@link
         * #recordMisses}, this method should only be called by the loading thread.
         *
         * @param loadTime the number of nanoseconds the cache spent computing or retrieving the new
         *     value
         */
        @SuppressWarnings("GoodTime") // should accept a java.time.Duration
        void recordLoadSuccess(long loadTime);
    
        /**
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 9.1K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

                "[^\\[]+\\[status=PENDING, info=\\[cause=\\[Because this test isn't done\\]\\]\\]");
        TimeoutException e =
            assertThrows(TimeoutException.class, () -> testFuture.get(1, TimeUnit.NANOSECONDS));
        assertThat(e.getMessage()).contains("1 nanoseconds");
        assertThat(e.getMessage()).contains("Because this test isn't done");
      }
    
      public void testToString_completesDuringToString() throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

    import static com.google.common.util.concurrent.TestPlatform.verifyGetOnPendingFuture;
    import static com.google.common.util.concurrent.TestPlatform.verifyTimedGetOnPendingFuture;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    import static java.util.concurrent.TimeUnit.SECONDS;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  9. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        val inputStream = connection.getInputStream()
        assertThat(inputStream.read()).isEqualTo(-1)
        val elapsedNanos = System.nanoTime() - startNanos
        val elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedNanos)
        assertThat(elapsedMillis).isBetween(500L, 1000L)
      }
    
      /**
       * Throttle the response body by sleeping 500ms after every 3 bytes. With a 6-byte response, this
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  10. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

          try {
            response = chain.proceed(request)
          } catch (e: Exception) {
            logger.log("<-- HTTP FAILED: $e")
            throw e
          }
    
          val tookMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNs)
    
          val responseBody = response.body!!
          val contentLength = responseBody.contentLength()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
Back to top