Java Milliseconds getLogTimeFromMillis(Long millis)

Here you can find the source of getLogTimeFromMillis(Long millis)

Description

get Log Time From Millis

License

Apache License

Declaration

public static String getLogTimeFromMillis(Long millis) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String getLogTimeFromMillis(Long millis) {
        return addLeadingZeros(String.valueOf(millis));
    }//from w  ww . j a  va  2s. c om

    private static String addLeadingZeros(String str) {
        String nStr = str;
        while (nStr.length() < 15) {
            nStr = "0" + nStr;
        }
        //Logger.debug("logTime is " + str + " => " + nStr + " length " + str.length());
        return nStr;
    }
}

Related

  1. getDurationSecFromMillisDouble(long millis)
  2. getElapsedTimeInMilliseconds(Date startDate, Date endDate)
  3. getExpirationInMilliSeconds(long currentTime, int expirationTime)
  4. getExpirationMillisAbs(int recordExpirationTimestamp)
  5. getFullSecondsElapsedTimeMillis(long start, long end)
  6. getMillis()
  7. getMillis()
  8. getMillis(long ticks)
  9. getMillis(long timeInMinutes)