Changed stuff for the timing of the threads.