Added function waitSimTime(total_time, dt) and a counter within the controller such that the controller will wait till the number of iterations to reach the total time based on the time_step (dt)