用python计算程序任何部分执行时间的最简单方法
easy-tictoc的Python项目详细描述
用法
“Python
from tictoc import tic, toc
tic()
<some codes>
toc() # to show the execution time directly with built-in print function
#-----------------------------------------#
tic()
<some codes 2>
execution_time = toc(False) # do not show, but return as a variable
“”“