Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 5 of 5 for sleepMillis (0.06 seconds)

  1. okhttp/src/jvmTest/kotlin/okhttp3/WholeOperationTimeoutTest.kt

      }
    
      private fun sleepingRequestBody(sleepMillis: Int): RequestBody =
        object : RequestBody() {
          override fun contentType(): MediaType? = "text/plain".toMediaTypeOrNull()
    
          @Throws(IOException::class)
          override fun writeTo(sink: BufferedSink) {
            try {
              sink.writeUtf8("abc")
              sink.flush()
              Thread.sleep(sleepMillis.toLong())
              sink.writeUtf8("def")
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Jun 18 12:28:21 GMT 2025
    - 10.6K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

          limiter.acquire(); // #1
        }
        stopwatch.sleepMillis(500); // #2: to repay for the last acquire
        stopwatch.sleepMillis(4000); // #3: becomes cold again
        for (int i = 0; i < 8; i++) {
          limiter.acquire(); // // #4
        }
        stopwatch.sleepMillis(500); // #5: to repay for the last acquire
        stopwatch.sleepMillis(2000); // #6: didn't get cold! It would take another 2 seconds to go cold
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 22K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

          limiter.acquire(); // #1
        }
        stopwatch.sleepMillis(500); // #2: to repay for the last acquire
        stopwatch.sleepMillis(4000); // #3: becomes cold again
        for (int i = 0; i < 8; i++) {
          limiter.acquire(); // // #4
        }
        stopwatch.sleepMillis(500); // #5: to repay for the last acquire
        stopwatch.sleepMillis(2000); // #6: didn't get cold! It would take another 2 seconds to go cold
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 22K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

          super(tMinus);
        }
    
        @Override
        protected void doAction() {}
      }
    
      private static void sleepSuccessfully(long sleepMillis) {
        Completion completed = new Completion(sleepMillis - SLEEP_SLACK);
        Uninterruptibles.sleepUninterruptibly(sleepMillis, MILLISECONDS);
        completed.assertCompletionExpected();
      }
    
      private static void assertTimeNotPassed(Stopwatch stopwatch, long timelimitMillis) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 38.1K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

          super(tMinus);
        }
    
        @Override
        protected void doAction() {}
      }
    
      private static void sleepSuccessfully(long sleepMillis) {
        Completion completed = new Completion(sleepMillis - SLEEP_SLACK);
        Uninterruptibles.sleepUninterruptibly(sleepMillis, MILLISECONDS);
        completed.assertCompletionExpected();
      }
    
      private static void assertTimeNotPassed(Stopwatch stopwatch, long timelimitMillis) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 38.1K bytes
    - Click Count (0)
Back to Top