Modified render loop delay function