当前位置:主页 > 软件编程 > Python代码 >

pycham查看程序执行的时间方法

时间:2021-09-13 08:02:14 | 栏目:Python代码 | 点击:

如下所示:

import time

首先导入时间模块

在程序开始执行的地方写入:

start=time.clock()

在程序末尾写入:

end=time.clock()

打印出运行时间:

print("final is in ",end-start)

您可能感兴趣的文章:

相关文章