Python Set Time Limit On Function In Jquery