Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 174 for millis (0.17 sec)

  1. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

       */
      static void delay(long millis) throws InterruptedException {
        long startTime = System.nanoTime();
        long ns = millis * 1000 * 1000;
        for (; ; ) {
          if (millis > 0L) Thread.sleep(millis);
          else // too short to sleep
          Thread.yield();
          long d = ns - (System.nanoTime() - startTime);
          if (d > 0L) millis = d / (1000 * 1000);
          else break;
        }
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/TestThread.java

     * @author Justin T. Sampson
     */
    public final class TestThread<L> extends Thread implements TearDown {
    
      private static final long DUE_DILIGENCE_MILLIS = 100;
      private static final long TIMEOUT_MILLIS = 5000;
    
      private final L lockLikeObject;
    
      private final SynchronousQueue<Request> requestQueue = new SynchronousQueue<>();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

      check(duration >= 0L) { "$name < 0" }
      val millis = unit.toMillis(duration)
      require(millis <= Integer.MAX_VALUE) { "$name too large" }
      require(millis != 0L || duration <= 0L) { "$name too small" }
      return millis.toInt()
    }
    
    internal fun checkDuration(
      name: String,
      duration: Duration,
    ): Int {
      check(!duration.isNegative()) { "$name < 0" }
      val millis = duration.inWholeMilliseconds
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/Cache.kt

            }
            val sendRequestMillisString = responseHeadersBuilder[SENT_MILLIS]
            val receivedResponseMillisString = responseHeadersBuilder[RECEIVED_MILLIS]
            responseHeadersBuilder.removeAll(SENT_MILLIS)
            responseHeadersBuilder.removeAll(RECEIVED_MILLIS)
            sentRequestMillis = sendRequestMillisString?.toLong() ?: 0L
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java

    import junit.framework.TestCase;
    
    /**
     * Unit test for {@link AbstractService}.
     *
     * @author Jesse Wilson
     */
    public class AbstractServiceTest extends TestCase {
    
      private static final long LONG_TIMEOUT_MILLIS = 10000;
      private Thread executionThread;
      private Throwable thrownByExecutionThread;
    
      public void testNoOpServiceStartStop() throws Exception {
        NoOpService service = new NoOpService();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        }
      }
    
      private static void assertNotInterrupted() {
        assertFalse(Thread.interrupted());
      }
    
      private static void requestInterruptIn(long millis) {
        InterruptionUtil.requestInterruptIn(millis, MILLISECONDS);
      }
    
      @CanIgnoreReturnValue
      private static Thread acquireFor(final Lock lock, final long duration, final TimeUnit unit) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 31.7K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http/ExchangeCodec.kt

         * reuse, this timeout should be significantly less than the time it takes to establish a new
         * connection.
         */
        const val DISCARD_STREAM_TIMEOUT_MILLIS = 100
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb1/util/Encdec.java

        public static final int TIME_1904_SEC_32LE = 4;
        public static final int TIME_1601_NANOS_64LE = 5;
        public static final int TIME_1601_NANOS_64BE = 6;
        public static final int TIME_1970_MILLIS_64BE = 7;
        public static final int TIME_1970_MILLIS_64LE = 8;
    
        /* Encode integers
         */
    
        public static int enc_uint16be( short s, byte[] dst, int di ) {
            dst[di++] = (byte)((s >> 8) & 0xFF);
    Java
    - Registered: Sun Apr 28 00:10:09 GMT 2024
    - Last Modified: Fri Mar 22 20:39:42 GMT 2019
    - 10.9K bytes
    - Viewed (0)
  9. docs/changelogs/changelog_1x.md

        adapter. (thanks kwuollett)
     *  Add a media type class to OkHttp.
     *  Change custom header prefix:
    
        ```
        X-Android-Sent-Millis is now OkHttp-Sent-Millis
        X-Android-Received-Millis is now OkHttp-Received-Millis
        X-Android-Response-Source is now OkHttp-Response-Source
        X-Android-Selected-Transport is now OkHttp-Selected-Transport
        ```
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 6.4K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

       */
      static void delay(long millis) throws InterruptedException {
        long startTime = System.nanoTime();
        long ns = millis * 1000 * 1000;
        for (; ; ) {
          if (millis > 0L) Thread.sleep(millis);
          else // too short to sleep
          Thread.yield();
          long d = ns - (System.nanoTime() - startTime);
          if (d > 0L) millis = d / (1000 * 1000);
          else break;
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.2K bytes
    - Viewed (0)
Back to top