MCPcopy Create free account
hub / github.com/OpenHD/OpenHD / handle_power_command_async

Method handle_power_command_async

OpenHD/ohd_common/src/openhd_reboot_util.cpp:71–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void openhd::reboot::handle_power_command_async(std::chrono::milliseconds delay,
72 bool shutdownOnly) {
73 const std::string tag = shutdownOnly ? "SHUTDOWN" : "REBOOT";
74 AsyncHandle::instance().execute_async(tag, [delay, shutdownOnly] {
75 std::this_thread::sleep_for(delay);
76 systemctl_power(shutdownOnly);
77 });
78}

Callers

nothing calls this directly

Calls 1

execute_asyncMethod · 0.80

Tested by

no test coverage detected