Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for chooseUnit (0.08 sec)

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

        long nanos = elapsedNanos();
    
        TimeUnit unit = chooseUnit(nanos);
        double value = (double) nanos / NANOSECONDS.convert(1, unit);
    
        // Too bad this functionality is not exposed as a regular method call
        return Platform.formatCompact4Digits(value) + " " + abbreviate(unit);
      }
    
      private static TimeUnit chooseUnit(long nanos) {
        if (DAYS.convert(nanos, NANOSECONDS) > 0) {
          return DAYS;
    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