package me.ycdev.androidlib.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class DateTimeUtils {
    /**
     * Generate file name from system time in the format "yyyyMMdd-HHmmss-SSS",
     * @param sysTime System time in milliseconds
     */
    public static String generateFileName(long sysTime) {
        return new SimpleDateFormat("yyyyMMdd-HHmmss-SSS", Locale.US).format(new Date(sysTime));
    }
}

@@ -448,11 +448,1128 @@
 );%0A    %7D
+%0A%0A    /**%0A     * Format the time usage to string like %221d17h37m3s728ms%22%0A     * @param timeUsageMs%0A     * @return%0A     */%0A    public static String getReadeableTimeUsage(long timeUsageMs) %7B%0A        long millisecondsLeft = timeUsageMs %25 1000;%0A        if (timeUsageMs == millisecondsLeft) %7B%0A            return millisecondsLeft + %22ms%22;%0A        %7D%0A%0A        long seconds = timeUsageMs / 1000;%0A        long secondsLeft = seconds %25 60;%0A        if (secondsLeft == seconds) %7B%0A            return secondsLeft + %22s%22 + millisecondsLeft + %22ms%22;%0A        %7D%0A%0A        long minutes = seconds / 60;%0A        long minutesLeft = minutes %25 60;%0A        if (minutesLeft == minutes) %7B%0A            return minutesLeft + %22m%22 + secondsLeft + %22s%22 + millisecondsLeft + %22ms%22;%0A        %7D%0A%0A        long hours = minutes / 60;%0A        long hoursLeft = hours %25 24;%0A        if (hoursLeft == hours) %7B%0A            return hoursLeft + %22h%22 + minutesLeft + %22m%22 + secondsLeft + %22s%22 + millisecondsLeft + %22ms%22;%0A        %7D%0A%0A        long days = hours / 24;%0A        return days + %22d%22 + hoursLeft + %22h%22 + minutesLeft + %22m%22 + secondsLeft + %22s%22 + millisecondsLeft + %22ms%22;%0A    %7D
 %0A%7D%0A

Add time usage string utils