python记录程序运行时间

import time
start = time.process_time()

需要运行的代码

end = time.process_time()
print("运行时间为%fs" %(end-start))

 

posted @ 2021-06-21 15:16  在路上的羊咩  阅读(395)  评论(0)    收藏  举报