diff --git a/source/shutdown.cpp b/source/shutdown.cpp index 5f3e163..c7804c0 100644 --- a/source/shutdown.cpp +++ b/source/shutdown.cpp @@ -91,33 +91,22 @@ namespace SystemShutdown { } #elif __APPLE__ - // macOS - double delay_minutes = config.delay_seconds / 60.0; - std::string delay_str = "+" + std::to_string(delay_minutes); - if (config.delay_seconds < 60) { - delay_str = "+0.1"; // mínimo delay en macOS - } - + // macOS - apagado inmediato char* args[] = { const_cast("shutdown"), const_cast("-h"), - const_cast(delay_str.c_str()), + const_cast("now"), NULL }; return executeUnixShutdown("shutdown", args); #elif __linux__ - // Linux - std::string delay_str = "+" + std::to_string((config.delay_seconds + 59) / 60); // redondear hacia arriba a minutos - if (config.delay_seconds == 0) { - delay_str = "now"; - } - + // Linux - apagado inmediato char* args[] = { const_cast("shutdown"), const_cast("-h"), - const_cast(delay_str.c_str()), + const_cast("now"), NULL };