获取两个动作之间的时间差
import datetime t1 = datetime.datetime.now() print(t1) print("经过的时间") t2 = datetime.datetime.now() print(t2) t = t2 - t1 print(t)
获取两个动作之间的时间差
import datetime t1 = datetime.datetime.now() print(t1) print("经过的时间") t2 = datetime.datetime.now() print(t2) t = t2 - t1 print(t)