41 |
char buffer[1024]; |
char buffer[1024]; |
42 |
std::ifstream in; |
std::ifstream in; |
43 |
|
|
44 |
in.open("/proc/acpi/processor/CPU1/throttling"); |
in.open("/proc/acpi/processor/CPU0/throttling"); |
45 |
if (!in) |
if (!in) |
46 |
throw std::runtime_error("Could not open file"); |
throw std::runtime_error("Could not open file"); |
47 |
|
|
116 |
throw std::invalid_argument("newState too small"); |
throw std::invalid_argument("newState too small"); |
117 |
|
|
118 |
std::ofstream out; |
std::ofstream out; |
119 |
out.open("/proc/acpi/processor/CPU1/throttling"); |
out.open("/proc/acpi/processor/CPU0/throttling"); |
120 |
|
|
121 |
if (!out) |
if (!out) |
122 |
throw std::runtime_error("Could not open file"); |
throw std::runtime_error("Could not open file"); |