Bug 550195 - Reduce wait time in runtime process termination

Java 8 added a waitFor method with timeout for the Process class. Using
this instead of the plain Thread.sleep can reduce waiting time in some
situations from 500 ms down to 10 ms.

For the case that Process is not a native process and has no optimized
waitFor implementation the situation still improves since the terminated
check is performed every 100 ms instead every 500 ms.

Change-Id: I0fc54981b53615fbae14d46a6c82a9b85d64b035
Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
4 files changed