took execution time into account in the main loop of the closed loop test