📜  python 测量时间 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:29.738000             🧑  作者: Mango

代码示例5
import timeit
import_module = "import random"
testcode = ''' 
def test(): 
    return random.randint(10, 100)
'''
print(timeit.repeat(stmt=testcode, setup=import_module))