SteamWar/BauSystem
Archiviert
13
0

Hotfix BauSystem RamUsage and AutoShutdown

Dieser Commit ist enthalten in:
yoyosource 2021-04-03 08:32:37 +02:00
Ursprung fe6a40577c
Commit 08e0578fb4

Datei anzeigen

@ -34,6 +34,7 @@ public class RamUsage {
try { try {
long memorySize = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemorySize(); long memorySize = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemorySize();
long freeMemory = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getFreePhysicalMemorySize(); long freeMemory = ((com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getFreePhysicalMemorySize();
System.out.println((memorySize - freeMemory) / (double) memorySize);
return (memorySize - freeMemory) / (double) memorySize; return (memorySize - freeMemory) / (double) memorySize;
} catch (Throwable throwable) { } catch (Throwable throwable) {
throwable.printStackTrace(); throwable.printStackTrace();