Fix clang warnings about struct vs. class.

Change-Id: I9f26cd01ac3153efa6d77a4133686842e2d63203
Use time() instead of clock() for timeouts.

The clock() function returns the processor time used by the process. This
is not a good timeout mechanism since the code is suspended most of the
time waiting for the forked process to finish. Replace with the time()
function.

Bug: 17154069

(cherry picked from commit 89d4949f86f4f7b6710e951afefad186c667fd6e)

Change-Id: I42f0f24ee53ef99955fd482a1089e39d491f3bd5
Merge "Use time() instead of clock() for timeouts." into du44