Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ofNanos (0.23 sec)

  1. guava-tests/test/com/google/common/base/StopwatchJavaTimeTest.java

      private final Stopwatch stopwatch = new Stopwatch(ticker);
    
      public void testElapsed_duration() {
        stopwatch.start();
        ticker.advance(999999);
        assertEquals(Duration.ofNanos(999999), stopwatch.elapsed());
        ticker.advance(1);
        assertEquals(Duration.ofMillis(1), stopwatch.elapsed());
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu May 04 09:41:29 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

        try {
          builder.callTimeout(Duration.ofNanos(1))
        } catch (ignored: IllegalArgumentException) {
        }
        try {
          builder.connectTimeout(Duration.ofNanos(1))
        } catch (ignored: IllegalArgumentException) {
        }
        try {
          builder.writeTimeout(Duration.ofNanos(1))
        } catch (ignored: IllegalArgumentException) {
        }
        try {
          builder.readTimeout(Duration.ofNanos(1))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/base/Stopwatch.java

       *
       * @since 22.0 (but only since 33.4.0 in the Android flavor)
       */
      @J2ktIncompatible
      @GwtIncompatible
      @J2ObjCIncompatible
      public Duration elapsed() {
        return Duration.ofNanos(elapsedNanos());
      }
    
      /** Returns a string representation of the current elapsed time. */
      @Override
      public String toString() {
        long nanos = elapsedNanos();
    
        TimeUnit unit = chooseUnit(nanos);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 9.3K bytes
    - Viewed (0)
Back to top