Python Measure Time Of Function