有没有办法查看脚本在 VS Code 中执行/完成需要多长时间?
我正在寻找这样的消息:
Program finished in 30ms
最佳答案
使用“时间”
当您的脚本启动时:
import time
start_time = time.time()
do something # here your actual code/routine
print("Process finished --- %s seconds ---" % (time.time() - start_time))
关于python - 我如何查看在 Visual Studio Code 中运行我的程序所花费的时间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57409385/