import datetime,time
start = datetime.datetime.now()...dosomething()
end = datetime.datetime.now()print(str(end - start)[:-7])