Python Find Time Taken By A Function