Fix undeclared `time` variable.

When running tests in strict mode, PHP complains of an undeclared `$time` variable at the end of the `processChildResult` function. Moving the `$time` initialisations at the top of the function fixes it.