Python's time.clock() vs. time.time() accuracy?

后端 未结 16 1444
忘掉有多难
忘掉有多难 2020-11-22 08:22

Which is better to use for timing in Python? time.clock() or time.time()? Which one provides more accuracy?

for example:

start = time.clock()
... do          


        
16条回答
  •  清酒与你
    2020-11-22 09:03

    To the best of my understanding, time.clock() has as much precision as your system will allow it.

提交回复
热议问题