init: fix process restarting
The time data types associated with restarting processes halfway moved to std::chrono and halfway didn't. In this intermediate state, the times would get converted from nanoseconds to seconds then to milliseconds. The precision lost when converting to seconds would cause the main loop of init to spin whenever a process was within a second of being restarted. This patch cleans up this logic and uses nanoseconds and milliseconds explicitly, with a ceiling to milliseconds to prevent unneeded spinning. Test: boot bullhead, kill processes, see that they restart sanely. Change-Id: I0b017ba0e50c09704b0c5cdfcde1dba461804593
Loading
Please register or sign in to comment