Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 320 for TimeUnit (0.04 seconds)

  1. guava/src/com/google/common/base/Stopwatch.java

    import static java.util.concurrent.TimeUnit.DAYS;
    import static java.util.concurrent.TimeUnit.HOURS;
    import static java.util.concurrent.TimeUnit.MICROSECONDS;
    import static java.util.concurrent.TimeUnit.MILLISECONDS;
    import static java.util.concurrent.TimeUnit.MINUTES;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    import static java.util.concurrent.TimeUnit.SECONDS;
    
    import com.google.common.annotations.GwtCompatible;
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Wed Oct 08 18:55:33 GMT 2025
    - 9.2K bytes
    - Click Count (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

     */
    package okhttp3.internal.connection
    
    import java.io.IOException
    import java.util.concurrent.CopyOnWriteArrayList
    import java.util.concurrent.LinkedBlockingDeque
    import java.util.concurrent.TimeUnit
    import okhttp3.internal.concurrent.Task
    import okhttp3.internal.concurrent.TaskRunner
    import okhttp3.internal.connection.RoutePlanner.ConnectResult
    import okhttp3.internal.connection.RoutePlanner.Plan
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 5.8K bytes
    - Click Count (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/DuplexTest.kt

            .Builder()
            .headersDelay(1500, TimeUnit.MILLISECONDS)
            .build(),
        )
        val request =
          Request
            .Builder()
            .url(server.url("/"))
            .post(DelayedRequestBody("hello".toRequestBody(null), 1500, TimeUnit.MILLISECONDS))
            .build()
        client =
          client
            .newBuilder()
            .readTimeout(1000, TimeUnit.MILLISECONDS)
            .build()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Tue Nov 04 19:13:52 GMT 2025
    - 25.8K bytes
    - Click Count (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/WrappingScheduledExecutorServiceTest.java

        long lastInitialDelay;
        long lastDelay;
        TimeUnit lastUnit;
    
        void assertLastMethodCalled(String method, long delay, TimeUnit unit) {
          assertEquals(method, lastMethodCalled);
          assertEquals(delay, lastDelay);
          assertEquals(unit, lastUnit);
        }
    
        void assertLastMethodCalled(String method, long initialDelay, long delay, TimeUnit unit) {
          assertEquals(method, lastMethodCalled);
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Mon Jul 14 14:44:08 GMT 2025
    - 7.4K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/util/concurrent/WrappingScheduledExecutorService.java

      }
    
      @Override
      public final ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit) {
        return delegate.schedule(wrapTask(command), delay, unit);
      }
    
      @Override
      public final <V extends @Nullable Object> ScheduledFuture<V> schedule(
          Callable<V> task, long delay, TimeUnit unit) {
        return delegate.schedule(wrapTask(task), delay, unit);
      }
    
      @Override
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 2.4K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/collect/ForwardingBlockingDeque.java

        delegate().putLast(e);
      }
    
      @Override
      public boolean offerFirst(E e, long timeout, TimeUnit unit) throws InterruptedException {
        return delegate().offerFirst(e, timeout, unit);
      }
    
      @Override
      public boolean offerLast(E e, long timeout, TimeUnit unit) throws InterruptedException {
        return delegate().offerLast(e, timeout, unit);
      }
    
      @Override
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 4.3K bytes
    - Click Count (0)
  7. src/test/java/jcifs/util/ResourceManagerTest.java

    import static org.junit.jupiter.api.Assertions.assertThrows;
    import static org.junit.jupiter.api.Assertions.assertTrue;
    
    import java.util.Map;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.atomic.AtomicBoolean;
    
    import org.junit.jupiter.api.BeforeEach;
    import org.junit.jupiter.api.DisplayName;
    import org.junit.jupiter.api.Test;
    import org.junit.jupiter.api.Timeout;
    
    /**
    Created: Sat Dec 20 13:44:44 GMT 2025
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 8.9K bytes
    - Click Count (0)
  8. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        val elapsedMillis = TimeUnit.NANOSECONDS.toMillis(elapsedNanos)
        assertThat(elapsedMillis).isBetween(500L, 1000L)
      }
    
      /** Delay the response body by sleeping 1s.  */
      @Test
      fun delayResponse() {
        assumeNotWindows()
        server.enqueue(
          MockResponse()
            .setBody("ABCDEF")
            .setBodyDelay(1, TimeUnit.SECONDS),
        )
        val startNanos = System.nanoTime()
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Thu Jul 03 13:16:34 GMT 2025
    - 22.3K bytes
    - Click Count (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/RecordingCallback.kt

        val timeoutMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()) + TIMEOUT_MILLIS
        while (true) {
          val i = responses.iterator()
          while (i.hasNext()) {
            val recordedResponse = i.next()
            if (recordedResponse.request.url.equals(url)) {
              i.remove()
              return recordedResponse
            }
          }
          val nowMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime())
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Fri Dec 27 13:39:56 GMT 2024
    - 2.1K bytes
    - Click Count (0)
  10. samples/guide/src/main/java/okhttp3/recipes/ConfigureTimeouts.java

    package okhttp3.recipes;
    
    import java.util.concurrent.TimeUnit;
    import okhttp3.OkHttpClient;
    import okhttp3.Request;
    import okhttp3.Response;
    
    public final class ConfigureTimeouts {
      private final OkHttpClient client;
    
      public ConfigureTimeouts() throws Exception {
        client = new OkHttpClient.Builder()
            .connectTimeout(5, TimeUnit.SECONDS)
            .writeTimeout(5, TimeUnit.SECONDS)
            .readTimeout(5, TimeUnit.SECONDS)
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Sat Sep 28 18:00:26 GMT 2019
    - 1.5K bytes
    - Click Count (0)
Back to Top