Files
universal-system-monitor/include/memory.h

30 lines
550 B
C++

#pragma once
#include <thread>
#include <mutex>
class Memory {
public:
Memory();
std::mutex Memory_Mutex;
long double MEMORY_TOTAL_MB;
long double MEMORY_FREE_MB;
long double MEMORY_AVAILABLE_MB;
long double MEMORY_ACTIVE_MB;
long double MEMORY_INACTIVE_MB;
int UPDATE_INTERVAL; // ms
void START_MEMORY_POLLING();
static void MEMORY_POLL(Memory* mem);
void END_MEMORY_POLLING();
virtual ~Memory();
private:
std::thread* m_pollThread;
bool m_isPolling;
};
static Memory* Memory_Instance;