import time
start_time = time.time() # 开始时间
print(start_time)
time.sleep(10)
end_time = time.time() # 现在时间
print(end_time)
print(“程序运行时间:%.2f秒” % (end_time - start_time))
print(“程序运行时间:%.f秒” % (end_time - start_time))
print(end_time - start_time)