Cut off a couple of zeros so we don't overflow on 32-bit.
Properly implement fake nanosleep in unit test
Properly calculate sleep time in ProcessWaitUntil{Stopped,Exited}

Backport of Mikhail's fc5ae177.