Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 226 for sleeps (0.82 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ThreadInterruptTest.kt

      }
    
      private fun sleep(delayMillis: Int) {
        try {
          Thread.sleep(delayMillis.toLong())
        } catch (e: InterruptedException) {
          Thread.currentThread().interrupt()
        }
      }
    
      private fun interruptLater(delayMillis: Int) {
        val toInterrupt = Thread.currentThread()
        val interruptingCow =
          Thread {
            sleep(delayMillis)
            toInterrupt.interrupt()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/fess/helper/ProcessHelperTest.java

                assertTrue(processHelper.isProcessRunning());
    
                // Wait a bit for the processes to start
                Thread.sleep(50);
    
                // Destroy all processes
                processHelper.destroy();
    
                // Wait a bit for destruction to complete
                Thread.sleep(100);
    
                assertFalse(processHelper.isProcessRunning());
            } catch (Exception e) {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sat Jul 12 05:35:01 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/lang/ThreadUtil.java

        }
    
        /**
         * Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds.
         *
         * @param millis
         *            the length of time to sleep in milliseconds
         * @throws InterruptedRuntimeException
         *             if any thread has interrupted the current thread.
         */
        public static void sleep(final long millis) {
            if (millis < 1L) {
                return;
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/base/SuppliersTest.java

        List<Integer> result = addSupplier.get();
        assertEquals(Integer.valueOf(0), result.get(0));
        assertEquals(Integer.valueOf(1), result.get(1));
      }
    
      @J2ktIncompatible
      @GwtIncompatible // Thread.sleep
      @SuppressWarnings("DoNotCall")
      public void testMemoizeWithExpiration_longTimeUnit() throws InterruptedException {
        CountingSupplier countingSupplier = new CountingSupplier();
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 17.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java

          this.everyMillis = everyMillis;
          this.interruptee = interruptee;
        }
    
        @Override
        public void run() {
          while (true) {
            try {
              Thread.sleep(everyMillis);
            } catch (InterruptedException e) {
              // ok. just stop sleeping.
            }
            if (shouldStop) {
              break;
            }
            interruptee.interrupt();
          }
        }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/WholeOperationTimeoutTest.kt

            .Builder()
            .url(server.url("/"))
            .build()
        val call = client.newCall(request)
        call.timeout().timeout(250, TimeUnit.MILLISECONDS)
        val response = call.execute()
        Thread.sleep(500)
        assertFailsWith<IOException> {
          response.body.source().readUtf8()
        }.also { expected ->
          assertThat(expected.message).isEqualTo("timeout")
          assertThat(call.isCanceled()).isTrue()
        }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/fess/helper/AbstractConfigHelperTest.java

            long endTime = System.currentTimeMillis();
    
            long elapsed = endTime - startTime;
            assertTrue("Expected at least 15ms sleep, got " + elapsed + "ms", elapsed >= 15);
            // Generous tolerance for CI environments like GitHub Actions
            assertTrue("Expected less than 200ms sleep, got " + elapsed + "ms", elapsed < 200);
        }
    
        public void test_waitForNext_withZeroInterval() {
            configHelper.setReloadInterval(0L);
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sat Jul 12 00:03:47 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/InterruptionUtil.java

          this.everyMillis = everyMillis;
          this.interruptee = interruptee;
        }
    
        @Override
        public void run() {
          while (true) {
            try {
              Thread.sleep(everyMillis);
            } catch (InterruptedException e) {
              // ok. just stop sleeping.
            }
            if (shouldStop) {
              break;
            }
            interruptee.interrupt();
          }
        }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketHttpTest.kt

            .build(),
        )
        val webSocket: WebSocket = newWebSocket()
        clientListener.assertOpen()
        val server = serverListener.assertOpen()
    
        // Sleep longer than the HTTP client's read timeout.
        Thread.sleep((client.readTimeoutMillis + 500).toLong())
        server.send("abc")
        clientListener.assertTextMessage("abc")
        closeWebSockets(webSocket, server)
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 35.5K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/fess/it/CrawlTestBase.java

                    return;
                }
                ThreadUtil.sleep(1000L);
            }
            fail("could not start job.");
        }
    
        protected static void waitJob(final String namePrefix) {
            Boolean isRunning = false;
            int count = 0;
    
            while (count < 300 && !isRunning) { // Wait until the crawler starts
                ThreadUtil.sleep(500);
                count++;
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Aug 07 03:06:29 UTC 2025
    - 10K bytes
    - Viewed (0)
Back to top