心跳記憶體顯示修正
This commit is contained in:
parent
f07129c18f
commit
eafd322a0d
@ -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")
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user