Merge "init: Improve readability of the code in SecondStageMain()"
This commit is contained in:
commit
5c7dc40926
1 changed files with 2 additions and 2 deletions
|
|
@ -1148,7 +1148,7 @@ int SecondStageMain(int argc, char** argv) {
|
|||
setpriority(PRIO_PROCESS, 0, 0);
|
||||
while (true) {
|
||||
// By default, sleep until something happens.
|
||||
auto epoll_timeout = std::optional<std::chrono::milliseconds>{kDiagnosticTimeout};
|
||||
std::chrono::milliseconds epoll_timeout{kDiagnosticTimeout};
|
||||
|
||||
auto shutdown_command = shutdown_state.CheckShutdown();
|
||||
if (shutdown_command) {
|
||||
|
|
@ -1168,7 +1168,7 @@ int SecondStageMain(int argc, char** argv) {
|
|||
if (next_process_action_time) {
|
||||
epoll_timeout = std::chrono::ceil<std::chrono::milliseconds>(
|
||||
*next_process_action_time - boot_clock::now());
|
||||
if (*epoll_timeout < 0ms) epoll_timeout = 0ms;
|
||||
if (epoll_timeout < 0ms) epoll_timeout = 0ms;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue