Adding in main loop timing.