sysinfowindowsimpl.h 548 B

123456789101112131415161718192021222324252627282930
  1. #ifndef SYSINFOWINDOWSIMPL_H
  2. #define SYSINFOWINDOWSIMPL_H
  3. #include <QtGlobal>
  4. #include <QVector>
  5. #include "sysinfo.h"
  6. typedef struct _FILETIME FILETIME;
  7. class SysInfoWindowsImpl : public SysInfo
  8. {
  9. public:
  10. SysInfoWindowsImpl();
  11. void init() override;
  12. double cpuLoadAverage() override;
  13. double memoryUsed() override;
  14. private:
  15. qulonglong convertFileTime(const FILETIME& filetime) const;
  16. int cpuPercent;
  17. int memoryPercent;
  18. int memoryAll;
  19. int memoryUse;
  20. int memoryFree;
  21. };
  22. #endif // SYSINFOWINDOWSIMPL_H