心跳記憶體顯示修正

This commit is contained in:
jasonchenwork 2025-06-24 10:45:57 +08:00
parent f07129c18f
commit eafd322a0d

View File

@ -168,7 +168,10 @@ namespace HeartbeatSender
private float GetTotalMemoryInMB()
{
var computerInfo = new ComputerInfo();
return computerInfo.TotalPhysicalMemory / (1024f * 1024f); // 轉 MB
var totalMB = computerInfo.TotalPhysicalMemory / (1024f);
var availableMB = computerInfo.AvailablePhysicalMemory / (1024f);
var usedMB = totalMB - availableMB;
return usedMB; // 轉 MB
}
private float GetDiskTotalSizeInGB(string driveLetter = "C")
{