show more info in technical tab view
This commit is contained in:
parent
f89a935c05
commit
aaad9fe7d8
src/main/java/eu/mhsl/craftattack/spawn/util/text
@ -151,7 +151,11 @@ public class ComponentUtil {
|
||||
))
|
||||
.append(Component.text(" | ", NamedTextColor.GRAY))
|
||||
.append(Component.text(
|
||||
String.format("%.2f load avg", monitor.getSystemLoadAverage()),
|
||||
String.format(
|
||||
"1min %.2f load avg (%.0f%%)",
|
||||
monitor.getSystemLoadAverage(),
|
||||
(monitor.getSystemLoadAverage() / monitor.getAvailableProcessors()) * 100
|
||||
),
|
||||
NamedTextColor.LIGHT_PURPLE
|
||||
))
|
||||
.append(Component.text(" | ", NamedTextColor.GRAY))
|
||||
|
@ -31,9 +31,11 @@ public class DataSizeConverter {
|
||||
long seconds = nanoseconds / 1_000_000_000;
|
||||
long minutes = seconds / 60;
|
||||
long hours = minutes / 60;
|
||||
long days = hours / 24;
|
||||
|
||||
seconds %= 60;
|
||||
minutes %= 60;
|
||||
return String.format("%dh%dm%ds", hours, minutes, seconds);
|
||||
hours %= 60;
|
||||
return String.format("%dd%dh%dm%ds", days, hours, minutes, seconds);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user