转载:https://www.cnblogs.com/zhangxinqi/p/7687862.html
a = datetime.datetime.now()
time.sleep(10)
b = datetime.datetime.now()
print((b-a).seconds)
两个时间点的时间间隔(秒)