Java Time Format formatTimeInNanos(long time)

Here you can find the source of formatTimeInNanos(long time)

Description

format Time In Nanos

License

Open Source License

Declaration

public static String formatTimeInNanos(long time) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    private static final String DECIMAL_FORMAT = "%.03f";

    public static String formatTimeInNanos(long time) {
        return formatDecimal(nanosToMillis(time));
    }/*from w w  w. j a v a  2s  .com*/

    public static String formatDecimal(double decimal) {
        return String.format(DECIMAL_FORMAT, decimal).replace('.', ',');
    }

    public static double nanosToMillis(long nanos) {
        return nanos * 0.000001;
    }
}

Related

  1. formatTimeDigital(int time)
  2. formatTimeDuringHour(long mss)
  3. formatTimeElapsed(long p_millis)
  4. formatTimeInfo(long time)
  5. formatTimeInMilisec(long time)
  6. formatTimeInterval(final long time)
  7. formatTimeInterval(long in)
  8. formatTimeLength(long ms)
  9. formatTimeLikeTimer(long time, boolean appendMs)