2 ms·
// power cycle computer bool was_on = set_computer_on(true); // returns prior value if (was_on) { set_computer_on(false); set_computer_on(true
by kazinator 5y ago
// power cycle computer
bool was_on = set_computer_on(true); // returns prior value
if (was_on) {
set_computer_on(false);
set_computer_on(true);
} else {
// was previously off, is now on: nothing to do!
}
- rudian 5y agoHave you tried turning it off and on again?