Updated the sim loop delay

Made it a smarter delay that will control frame rate.