Debug info: running time

This commit is contained in:
M66B
2022-06-14 15:55:11 +02:00
parent d756db14a7
commit b409f8b3b8
3 changed files with 37 additions and 2 deletions

View File

@@ -1677,6 +1677,14 @@ public class Helper {
return DateUtils.getRelativeTimeSpanString(context, millis);
}
static String formatDuration(long ms) {
int days = (int) (ms / (24 * 3600 * 1000L));
ms = ms % (24 * 3600 * 1000L);
long seconds = ms / 1000;
ms = ms % 1000;
return (days > 0 ? days + " " : "") + DateUtils.formatElapsedTime(seconds) + "." + ms;
}
static String formatNumber(Integer number, long max, NumberFormat nf) {
if (number == null)
return null;