Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for nanoSeconds (0.06 sec)

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

          return MINUTES;
        }
        if (SECONDS.convert(nanos, NANOSECONDS) > 0) {
          return SECONDS;
        }
        if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) {
          return MILLISECONDS;
        }
        if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) {
          return MICROSECONDS;
        }
        return NANOSECONDS;
      }
    
      private static String abbreviate(TimeUnit unit) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  2. android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java

      public void testAutoIncrementStep_returnsSameInstance() {
        FakeTicker ticker = new FakeTicker();
        assertSame(ticker, ticker.setAutoIncrementStep(10, NANOSECONDS));
      }
    
      public void testAutoIncrementStep_nanos() {
        FakeTicker ticker = new FakeTicker().setAutoIncrementStep(10, NANOSECONDS);
        assertEquals(0, ticker.read());
        assertEquals(10, ticker.read());
        assertEquals(20, ticker.read());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 22 13:49:09 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.base.Verify.verify;
    import static com.google.common.util.concurrent.Internal.toNanosSaturated;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.base.Preconditions;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  4. guava/src/com/google/common/util/concurrent/Uninterruptibles.java

     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.base.Verify.verify;
    import static com.google.common.util.concurrent.Internal.toNanosSaturated;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.base.Preconditions;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/testing/FakeTicker.java

        return advance(timeUnit.toNanos(time));
      }
    
      /** Advances the ticker value by {@code nanoseconds}. */
      @SuppressWarnings("GoodTime") // should accept a java.time.Duration
      @CanIgnoreReturnValue
      public FakeTicker advance(long nanoseconds) {
        nanos.addAndGet(nanoseconds);
        return this;
      }
    
      /**
       * Advances the ticker value by {@code duration}.
       *
       * @since 28.0
       */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

            hook.start();
          }
          for (Thread hook : hooks) {
            hook.join();
          }
        }
      }
    
      /* Half of a 1-second timeout in nanoseconds */
      private static final long HALF_SECOND_NANOS = NANOSECONDS.convert(1L, SECONDS) / 2;
    
      public void testShutdownAndAwaitTermination_immediateShutdown() throws Exception {
        ExecutorService service = Executors.newSingleThreadExecutor();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

            hook.start();
          }
          for (Thread hook : hooks) {
            hook.join();
          }
        }
      }
    
      /* Half of a 1-second timeout in nanoseconds */
      private static final long HALF_SECOND_NANOS = NANOSECONDS.convert(1L, SECONDS) / 2;
    
      public void testShutdownAndAwaitTermination_immediateShutdown() throws Exception {
        ExecutorService service = Executors.newSingleThreadExecutor();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/testing/FakeTicker.java

        return advance(timeUnit.toNanos(time));
      }
    
      /** Advances the ticker value by {@code nanoseconds}. */
      @SuppressWarnings("GoodTime") // should accept a java.time.Duration
      @CanIgnoreReturnValue
      public FakeTicker advance(long nanoseconds) {
        nanos.addAndGet(nanoseconds);
        return this;
      }
    
      /**
       * Advances the ticker value by {@code duration}.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/base/StopwatchBenchmark.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package com.google.common.base;
    
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    
    import com.google.caliper.Benchmark;
    
    /**
     * Simple benchmark: create, start, read. This does not currently report the most useful result
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/collect/QueuesTest.java

    import static java.lang.Thread.currentThread;
    import static java.util.concurrent.Executors.newCachedThreadPool;
    import static java.util.concurrent.TimeUnit.MILLISECONDS;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.base.Stopwatch;
    import java.util.Collection;
    import java.util.List;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 12.1K bytes
    - Viewed (0)
Back to top