📜  如何检查您的代码在 python 代码示例中运行所需的时间

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

代码示例1
def program_time_checker():
    start_time = time.time()
    print("Grepper")
    num = 90
    print(num)
    end_time = time.time()
    return end_time-start_time
#call the function to get the time taken by your program to run
print(program_time_checker())