Python - time.clock() vs. time.time() - accuracy?

Posted by Corey Goldberg on Stack Overflow See other posts from Stack Overflow or by Corey Goldberg
Published on 2008-09-17T17:09:13Z Indexed on 2010/03/28 17:03 UTC
Read the original article Hit count: 238

Filed under:

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 something
elapsed = (time.clock() - start)

vs.

start = time.time()
... do something
elapsed = (time.time() - start)

© Stack Overflow or respective owner

Related posts about python