diff --git a/tlib/src/system.cpp b/tlib/src/system.cpp index 01ebf485..b8c932a7 100644 --- a/tlib/src/system.cpp +++ b/tlib/src/system.cpp @@ -99,7 +99,10 @@ std::expected tlib::exec_and_wait(const char* executable, const std::vec return std::move(result); } -void tlib::reboot(){ +void tlib::reboot(int delay=0) { + if (delay != 0) { + tlib::sleep_ms(1000 * delay); + } asm volatile("mov rax, 0x50; int 50" : //No outputs : //No inputs @@ -108,7 +111,10 @@ void tlib::reboot(){ __builtin_unreachable(); } -void tlib::shutdown(){ +void tlib::shutdown(int delay=0){ + if (delay != 0) { + tlib::sleep_ms(1000 * delay); + } asm volatile("mov rax, 0x51; int 50" : //No outputs : //No inputs