Set timer, waiting for process to finish and then quit