diff options
Diffstat (limited to 'libLumina/LuminaOS-FreeBSD.cpp')
-rw-r--r-- | libLumina/LuminaOS-FreeBSD.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libLumina/LuminaOS-FreeBSD.cpp b/libLumina/LuminaOS-FreeBSD.cpp index 3bf857d9..290ddc11 100644 --- a/libLumina/LuminaOS-FreeBSD.cpp +++ b/libLumina/LuminaOS-FreeBSD.cpp @@ -297,7 +297,11 @@ int LOS::MemoryUsagePercent(){ if(mem[i].contains("Inact") || mem[i].contains("Free")){ fB = fB+LUtils::DisplaySizeToBytes(mem[i].section(" ",0,0)); } else{ uB = uB+LUtils::DisplaySizeToBytes(mem[i].section(" ",0,0)); } } - return qRound( (uB/(fB+uB)) * 100.0); + qDebug() << "Memory Calc:" << mem; + qDebug() << " - Bytes:" << "U:"<<uB<<"F:"<< fB<<"T:"<< (uB+fB); + double per = (uB/(fB+uB)) * 100.0; + qDebug() << " - Percentage:" << per; + return qRound(per); } #endif |