diff --git a/Utils.cpp b/Utils.cpp index 7bf8019..33dbaf6 100644 --- a/Utils.cpp +++ b/Utils.cpp @@ -766,7 +766,7 @@ status_t ForkExecvpTimeout(const std::vector& args, std::chrono::se } pid_t timer_pid = fork(); if (timer_pid == 0) { - sleep(timeout.count()); + std::this_thread::sleep_for(timeout); _exit(ETIMEDOUT); } if (timer_pid == -1) {