/** * Helper method to create a "Linux" uptime styled string that represents * the duration (in milliseconds). This method will only call other methods * publicly available on this class. Converts the duration into a String * such as "0 days, 01:05:12" or "2 days, 07:00:00". * @param durationInMillis The duration (in millis) * @return A styled String of the duration */ public static String toLinuxUptimeStyleString(long durationInMillis) { return getLinuxUptimeStyle().print(createDayHourMinSecPeriod(durationInMillis)); }
/** * Helper method to create a "Standard" uptime styled string that represents * the duration (in milliseconds). This method will only call other methods * publicly available on this class. Converts the duration into a String * such as "0 days 0 hours 1 min 50 secs" or "2 days 7 hours 1 min 50 secs". * @param durationInMillis The duration (in millis) * @return A styled String of the duration */ public static String toStandardUptimeStyleString(long durationInMillis) { return getStandardUptimeStyle().print(createDayHourMinSecPeriod(durationInMillis)); }
@Override public String getBoundDuration() { return PeriodFormatterUtil.toLinuxUptimeStyleString(System.currentTimeMillis() - getBoundTime()); }
@Override public String getBoundDuration() { return PeriodFormatterUtil.toLinuxUptimeStyleString(System.currentTimeMillis() - getBoundTime()); }
@Override public String getBoundDuration() { return PeriodFormatterUtil.toLinuxUptimeStyleString(System.currentTimeMillis() - getBoundTime()); }
/** * Helper method to create a "Linux" uptime styled string that represents * the duration (in milliseconds). This method will only call other methods * publicly available on this class. Converts the duration into a String * such as "0 days, 01:05:12" or "2 days, 07:00:00". * @param durationInMillis The duration (in millis) * @return A styled String of the duration */ public static String toLinuxUptimeStyleString(long durationInMillis) { return getLinuxUptimeStyle().print(createDayHourMinSecPeriod(durationInMillis)); }
/** * Helper method to create a "Standard" uptime styled string that represents * the duration (in milliseconds). This method will only call other methods * publicly available on this class. Converts the duration into a String * such as "0 days 0 hours 1 min 50 secs" or "2 days 7 hours 1 min 50 secs". * @param durationInMillis The duration (in millis) * @return A styled String of the duration */ public static String toStandardUptimeStyleString(long durationInMillis) { return getStandardUptimeStyle().print(createDayHourMinSecPeriod(durationInMillis)); }
@Override public String getBoundDuration() { return PeriodFormatterUtil.toLinuxUptimeStyleString(System.currentTimeMillis() - getBoundTime()); }