CpuInfo.h 596 B

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