小编Jam*_*mes的帖子

找出python脚本完成执行所花费的时间

我在python脚本中有以下代码:

def fun(): 
  #Code here

fun()
Run Code Online (Sandbox Code Playgroud)

我想执行这个脚本,并找出在几分钟内执行所需的时间.我如何知道执行此脚本需要多长时间?一个例子将非常感激.

python datetime execution-time

134
推荐指数
8
解决办法
16万
查看次数

标签 统计

datetime ×1

execution-time ×1

python ×1