Python Calculate Time To Run Function