Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 4 of 4 for ofNanos (0.04 seconds)

  1. okhttp/src/jvmTest/kotlin/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))
    Created: Fri Dec 26 11:42:13 GMT 2025
    - Last Modified: Wed Jun 18 12:28:21 GMT 2025
    - 13.4K bytes
    - Click Count (1)
  2. android/guava-tests/test/com/google/common/base/StopwatchTest.java

      }
    
      @GwtIncompatible
      @J2ktIncompatible
      public void testElapsed_duration() {
        stopwatch.start();
        ticker.advance(999999);
        assertEquals(Duration.ofNanos(999999), stopwatch.elapsed());
        ticker.advance(1);
        assertEquals(Duration.ofMillis(1), stopwatch.elapsed());
      }
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 6.1K bytes
    - Click Count (0)
  3. api/maven-api-core/src/main/java/org/apache/maven/api/MonotonicClock.java

         * @see #startInstant()
         * @see #instant()
         */
        public Duration elapsedTime() {
            long elapsedNanos = System.nanoTime() - startNanos;
            return Duration.ofNanos(elapsedNanos);
        }
    
        /**
         * Returns the zone ID of this clock, which is always UTC.
         *
         * @return the UTC zone ID
         */
        @Override
        public ZoneId getZone() {
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Wed Jan 15 06:28:29 GMT 2025
    - 5.6K bytes
    - Click Count (0)
  4. 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);
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Wed Oct 08 18:55:33 GMT 2025
    - 9.2K bytes
    - Click Count (0)
Back to Top