[FIXED JENKINS-20965] Run.writeWholeLogTo causes high CPU usage.

Wait one second before writing to log files. Switched to while loop to
prevent extra one second delay.