Questions tagged «time-measurement»

13
Python速度测试-时差-毫秒
为了快速测试一段代码,在Python中进行两次比较的正确方法是什么?我尝试阅读API文档。我不确定我是否了解timedelta。 到目前为止,我有以下代码: from datetime import datetime tstart = datetime.now() print t1 # code to speed test tend = datetime.now() print t2 # what am I missing? # I'd like to print the time diff here
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.