Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for ns (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. android/guava/src/com/google/common/base/Suppliers.java

                T t = delegate.get();
                value = t;
                nanos = now + durationNanos;
                // In the very unlikely event that nanos is 0, set it to 1;
                // no one will notice 1 ns of tardiness.
                expirationNanos = (nanos == 0) ? 1 : nanos;
                return t;
              }
            }
          }
          // This is safe because we checked `expirationNanos`.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 15.3K bytes
    - Viewed (0)
  3. 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)
  4. android/guava/src/com/google/common/cache/CacheBuilder.java

          s.add("maximumWeight", maximumWeight);
        }
        if (expireAfterWriteNanos != UNSET_INT) {
          s.add("expireAfterWrite", expireAfterWriteNanos + "ns");
        }
        if (expireAfterAccessNanos != UNSET_INT) {
          s.add("expireAfterAccess", expireAfterAccessNanos + "ns");
        }
        if (keyStrength != null) {
          s.add("keyStrength", Ascii.toLowerCase(keyStrength.toString()));
        }
        if (valueStrength != null) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 44.8K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

          overWaitNanosFirstDigit = '9';
        }
        String nanosRegex = "[4-" + overWaitNanosFirstDigit + "][0-9]+";
        assertWithMessage(
                "Spent " + thread.timeSpentBlocked + " ns blocked; slept for " + toWaitMillis + " ms")
            .that(thread.exception)
            .hasMessageThat()
            .matches(
                "Waited 2 seconds \\(plus "
                    + (longWait ? "3" : "1")
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

          overWaitNanosFirstDigit = '9';
        }
        String nanosRegex = "[4-" + overWaitNanosFirstDigit + "][0-9]+";
        assertWithMessage(
                "Spent " + thread.timeSpentBlocked + " ns blocked; slept for " + toWaitMillis + " ms")
            .that(thread.exception)
            .hasMessageThat()
            .matches(
                "Waited 2 seconds \\(plus "
                    + (longWait ? "3" : "1")
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  7. guava/src/com/google/common/base/Suppliers.java

                T t = delegate.get();
                value = t;
                nanos = now + durationNanos;
                // In the very unlikely event that nanos is 0, set it to 1;
                // no one will notice 1 ns of tardiness.
                expirationNanos = (nanos == 0) ? 1 : nanos;
                return t;
              }
            }
          }
          // This is safe because we checked `expirationNanos`.
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 15.3K bytes
    - Viewed (0)
Back to top