Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 134 for sleeps (0.16 sec)

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

        }
      }
    
      /**
       * Delays, via Thread.sleep, for the given millisecond delay, but if the sleep is shorter than
       * specified, may re-sleep or yield until time elapses.
       */
      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
    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. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

        }
      }
    
      /**
       * Delays, via Thread.sleep, for the given millisecond delay, but if the sleep is shorter than
       * specified, may re-sleep or yield until time elapses.
       */
      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
    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)
  3. guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

        tearDownStack.addTearDown(
            new TearDown() {
              @Override
              public void tearDown() {
                executor.shutdownNow();
              }
            });
        sleeper = new SleepingRunnable(1000);
        delayedFuture = executor.submit(sleeper, true);
    
        tearDownStack.addTearDown(
            new TearDown() {
              @Override
              public void tearDown() {
                Thread.interrupted();
              }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.1K bytes
    - Viewed (0)
  4. 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,
    Plain Text
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 29 21:35:03 GMT 2012
    - 145.2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/TestThread.java

        checkNotNull(methodName);
        checkNotNull(arguments);
        assertEquals(false, invokeMethod("hasQueuedThread", this));
        sendRequest(methodName, arguments);
        Thread.sleep(DUE_DILIGENCE_MILLIS);
        assertEquals(true, invokeMethod("hasQueuedThread", this));
        assertNull(responseQueue.poll());
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 10.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/RateLimiter.java

         *
         * T0 at 0 seconds
         * T1 at 1.05 seconds
         * T2 at 2 seconds
         * T3 at 3 seconds
         *
         * Due to the slight delay of T1, T2 would have to sleep till 2.05 seconds, and T3 would also
         * have to sleep till 3.05 seconds.
         */
        return create(permitsPerSecond, SleepingStopwatch.createFromSystemTimer());
      }
    
      @VisibleForTesting
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 18.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/CacheReferencesTest.java

        for (int i = 0; i < 500; i++) {
          System.gc();
    
          CacheTesting.drainReferenceQueues(cache);
          if (cache.size() == 1) {
            break;
          }
          try {
            Thread.sleep(10);
          } catch (InterruptedException e) {
            /* ignore */
          }
          try {
            // Fill up heap so soft references get cleared.
            filler = new byte[Math.max(filler.length, filler.length * 2)];
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 6.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/AggregateFutureStateFallbackAtomicHelperTest.java

       * prevent us from selecting our {@code SafeAtomicHelper} strategy.
       *
       * <p>Stashing this in a static field avoids loading it over and over again and speeds up test
       * execution significantly.
       */
      private static final ClassLoader NO_ATOMIC_FIELD_UPDATER =
          getClassLoader(
              ImmutableSet.of(
                  AtomicIntegerFieldUpdater.class.getName(),
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/ImmutableSortedMap.java

       * IllegalArgumentException} if passed a {@code fromKey} less than an earlier {@code fromKey}.
       * However, this method doesn't throw an exception in that situation, but instead keeps the
       * original {@code fromKey}. Similarly, this method keeps the original {@code toKey}, instead of
       * throwing an exception, if passed a {@code toKey} greater than an earlier {@code toKey}.
       */
      @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 53.2K bytes
    - Viewed (0)
  10. android/guava-tests/benchmark/com/google/common/base/JoinerBenchmark.java

              sb.append(DELIMITER_STRING);
            }
            sb.append(comp);
          }
          dummy ^= sb.toString().length();
        }
        return dummy;
      }
    
      /**
       * Similar to the above, but keeps a boolean flag rather than checking for the string accumulated
       * so far being empty. As a result, it does not have the above-mentioned bug.
       */
      @Benchmark
      int booleanIfFirst(int reps) {
        int dummy = 0;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.9K bytes
    - Viewed (0)
Back to top