CpuInfo.h 565 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <stdint.h>
  3. namespace il2cpp
  4. {
  5. namespace os
  6. {
  7. class CpuInfo
  8. {
  9. public:
  10. static void* Create();
  11. /*
  12. * This function returns the cpu usage in percentage,
  13. * normalized on the number of cores.
  14. *
  15. * Warning : the percentage returned can be > 100%. This
  16. * might happens on systems like Android which, for
  17. * battery and performance reasons, shut down cores and
  18. * lie about the number of active cores.
  19. */
  20. static int32_t Usage(void* previous);
  21. };
  22. }
  23. }