from time import time
start = time()
print("Start: "+ str(start))
# 需要计时的程序
stop = time()
print("Stop: "+ str(stop))
total_time=str(stop-start)
print(total_time +"秒")
python查看一段程序的运行时长
猜你喜欢
转载自blog.csdn.net/PoGeN1/article/details/103660963
今日推荐
周排行