Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 226 for sleeps (0.84 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/internal/MockWebServerSocket.kt

      }
    
      fun shutdownOutput() {
        javaNetSocket.shutdownOutput()
      }
    
      /** Sleeps [nanos], throwing if the socket is closed before that period has elapsed. */
      fun sleepWhileOpen(nanos: Long) {
        var ms = nanos / 1_000_000L
        val ns = nanos - (ms * 1_000_000L)
    
        while (ms > 100) {
          Thread.sleep(100)
          if (javaNetSocket.isClosed) throw InterruptedIOException("socket closed")
          ms -= 100L
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  2. mockwebserver/src/main/kotlin/mockwebserver3/internal/ThrottledSink.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     *
     */
    package mockwebserver3.internal
    
    import okio.Buffer
    import okio.Sink
    
    /**
     * A sink that sleeps [periodDelayNanos] every [bytesPerPeriod] bytes. Unlike [okio.Throttler],
     * this permits any interval to be used.
     */
    internal class ThrottledSink(
      private val socket: MockWebServerSocket,
      private val delegate: Sink,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 29 12:43:16 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/fess/auth/chain/CommandChain.java

                    }
                }
                currentProcess = null;
    
            }
        }
    
        /**
         * Monitor thread that handles process timeout and termination.
         * This thread sleeps for the specified timeout duration and terminates the process if it hasn't finished.
         */
        protected static class MonitorThread extends Thread {
            /** The process to monitor. */
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 13.1K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/io/testdata/alice_in_wonderland.txt

    like what I get" is the same thing as "I get what I like"!'
    
      `You might just as well say,' added the Dormouse, who seemed to
    be talking in his sleep, `that "I breathe when I sleep" is the
    same thing as "I sleep when I breathe"!'
    
      `It IS the same thing with you,' said the Hatter, and here the
    conversation dropped, and the party sat silent for a minute,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Apr 21 02:27:51 UTC 2017
    - 145.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

          }
        } finally {
          if (interrupted) {
            Thread.currentThread().interrupt();
          }
        }
      }
    
      // TODO(user): Support Sleeper somehow (wrapper or interface method)?
      /**
       * Invokes {@code unit.}{@link TimeUnit#sleep(long) sleep(sleepFor)} uninterruptibly.
       *
       * @since 33.4.0 (but since 28.0 in the JRE flavor)
       */
      @J2ktIncompatible
      @GwtIncompatible // concurrency
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 19.8K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt

        try {
          for (i in 1..2) {
            // Space out traffic to make it easier to demarcate.
            sendTestRequest(fbRequest)
            Thread.sleep(1000)
            sendTestRequest(twitterRequest)
            Thread.sleep(1000)
            sendTestRequest(googleRequest)
            Thread.sleep(2000)
          }
        } finally {
          client.connectionPool.evictAll()
          client.dispatcher.executorService.shutdownNow()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/core/timer/TimeoutManagerTest.java

            }, 1, true);
    
            assertNotNull(TimeoutManager.getInstance().thread);
            Thread.sleep(2000);
            assertTrue(expiredCount > 0);
            assertEquals(1, TimeoutManager.getInstance().getTimeoutTaskCount());
            TimeoutManager.getInstance().stop();
            assertNull(TimeoutManager.getInstance().thread);
            Thread.sleep(10);
            int count = expiredCount;
            task.stop();
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionReuseTest.kt

        val request = Request(server.url("/"))
        val response1 = client.newCall(request).execute()
        assertThat(response1.body.string()).isEqualTo("a")
    
        // Give the thread pool a chance to evict.
        Thread.sleep(500)
        val response2 = client.newCall(request).execute()
        assertThat(response2.body.string()).isEqualTo("b")
        assertThat(server.takeRequest().exchangeIndex).isEqualTo(0)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 12.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

      }
    
      /**
       * The stopwatch gathers events and presents them as strings. R0.6 means a delay of 0.6 seconds
       * caused by the (R)ateLimiter U1.0 means the (U)ser caused the stopwatch to sleep for a second.
       */
      static class FakeStopwatch extends SleepingStopwatch {
        long instant = 0L;
        final List<String> events = new ArrayList<>();
    
        @Override
        public long readMicros() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 21.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java

      }
    
      /**
       * The stopwatch gathers events and presents them as strings. R0.6 means a delay of 0.6 seconds
       * caused by the (R)ateLimiter U1.0 means the (U)ser caused the stopwatch to sleep for a second.
       */
      static class FakeStopwatch extends SleepingStopwatch {
        long instant = 0L;
        final List<String> events = new ArrayList<>();
    
        @Override
        public long readMicros() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 21.9K bytes
    - Viewed (0)
Back to top