Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for elapsedMillis (0.28 sec)

  1. platforms/core-runtime/time/src/main/java/org/gradle/internal/time/DefaultTimer.java

            reset();
        }
    
        @Override
        public String getElapsed() {
            long elapsedMillis = getElapsedMillis();
            return TimeFormatting.formatDurationVerbose(elapsedMillis);
        }
    
        @Override
        public long getElapsedMillis() {
            long elapsedNanos = timeSource.nanoTime() - startTime;
            long elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedNanos);
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 20:20:17 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  2. platforms/core-runtime/time/src/test/groovy/org/gradle/internal/time/DefaultTimerTest.groovy

            when:
            setTime(100)
            timer.reset()
            setTime(200)
    
            then:
            timer.elapsedMillis == 100
        }
    
        def testElapsed() throws Exception {
            when:
            setTime(100)
    
            then:
            timer.elapsedMillis == 100
        }
    
        private void setTime(long timestamp) {
            1 * timeSource.nanoTime() >> TimeUnit.MILLISECONDS.toNanos(timestamp)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 11 20:20:17 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  3. 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
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  4. mockwebserver/src/test/java/mockwebserver3/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
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

         * generous than it needs to be.
         */
        assertTrue(
            "Expected elapsed millis to be >= " + expectedMillis + " but was " + elapsedMillis,
            elapsedMillis + 5 >= expectedMillis);
      }
    
      // TODO(cpovirk): Split this into separate CountDownLatch and IncrementableCountDownLatch classes.
    
      /** Manages a {@link BlockingQueue} and associated timings for a {@code put} call. */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 16:06:39 UTC 2024
    - 31.7K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

         * generous than it needs to be.
         */
        assertTrue(
            "Expected elapsed millis to be >= " + expectedMillis + " but was " + elapsedMillis,
            elapsedMillis + 5 >= expectedMillis);
      }
    
      // TODO(cpovirk): Split this into separate CountDownLatch and IncrementableCountDownLatch classes.
    
      /** Manages a {@link BlockingQueue} and associated timings for a {@code put} call. */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Feb 09 22:57:07 UTC 2022
    - 30.9K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

        long t0 = System.nanoTime();
        try {
          super.runTest();
        } finally {
          long elapsedMillis = (System.nanoTime() - t0) / (1000L * 1000L);
          if (elapsedMillis >= profileThreshold)
            System.out.printf("%n%s: %d%n", toString(), elapsedMillis);
        }
      }
    
      //     /**
      //      * Runs all JSR166 unit tests using junit.textui.TestRunner
      //      */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 19:21:11 UTC 2024
    - 37.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

        long t0 = System.nanoTime();
        try {
          super.runTest();
        } finally {
          long elapsedMillis = (System.nanoTime() - t0) / (1000L * 1000L);
          if (elapsedMillis >= profileThreshold)
            System.out.printf("%n%s: %d%n", toString(), elapsedMillis);
        }
      }
    
      //     /**
      //      * Runs all JSR166 unit tests using junit.textui.TestRunner
      //      */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 17:15:24 UTC 2024
    - 37.7K bytes
    - Viewed (0)
  9. platforms/core-execution/persistent-cache/src/integTest/groovy/org/gradle/cache/internal/DefaultFileLockManagerContentionIntegrationTest.groovy

            }
            receivingLock.close()
            then:
            build.waitForFinish()
            pingRequestCount == 3 || pingRequestCount == 4
            timer.elapsedMillis > 3000 // See: DefaultFileLockContentionHandler.PING_DELAY
        }
    
        def "the lock holder starts the release request only once and discards additional requests in the meantime"() {
            given:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jun 11 09:51:15 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        val elapsedNanos = System.nanoTime() - startNanos
        val elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedNanos)
    
        // If we're working correctly, this should be greater than 100ms, but less than double that.
        // Previously we had a bug where we would download the entire response body as long as no
        // individual read took longer than 100ms.
        assertThat(elapsedMillis).isLessThan(500L)
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
Back to top