Low Power Mode detection

Change low to reduced

Low Power Mode detection

Fix namespace space

Low Power Mode detection

Fix namespace space

Low Power Mode detection
This commit is contained in:
nastys 2022-03-05 17:32:35 +01:00 committed by Megamouse
parent 686d2759f4
commit ce7b1576e0
4 changed files with 35 additions and 0 deletions

View file

@ -57,6 +57,11 @@ namespace Darwin_Version
extern int getNSminorVersion();
extern int getNSpatchVersion();
}
namespace Darwin_ProcessInfo
{
extern bool getLowPowerModeEnabled();
}
#endif
bool utils::has_ssse3()
@ -474,6 +479,15 @@ int utils::get_maxfiles()
#endif
}
bool utils::get_low_power_mode()
{
#ifdef __APPLE__
return Darwin_ProcessInfo::getLowPowerModeEnabled();
#else
return false;
#endif
}
static constexpr ullong round_tsc(ullong val)
{
return utils::rounded_div(val, 1'000'000) * 1'000'000;