-
Notifications
You must be signed in to change notification settings - Fork 2.1k
replace time.clock() by time.time() #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Where have you heard that |
|
Sorry for the last comment, I mixed some information. time.clock has different implementation on linux and windows. A lot of discussions can be easily found on stackoverflow. And time.clock may give strange result when using BLAS though something like numpy.dot, as found on my macbook air. This may due to the multithread feature. It is safer to report time.time(), as wall time. You can check out those discussions online. There are a lot of them.
|
|
I just updated my comment. Please ignore the previous email. On Sun, Jun 28, 2015 at 8:33 PM, abergeron [email protected] wrote:
Ke(Kevin) Wu |
|
I checked out this discussion on stackoverflow, it says time.clock() is not as accurate as time.time() on Unix system. And, the discussion says time.clock() can't give the correct result while using GPU. However, I think |
|
I decide to close this pull request since using |
|
Just for the record, the discussion on stack overflow refers to timing very short snippets of code, which is not what we do here (the usual measured time is in minutes). It is important to consider the context in which the code is used and since we don't need anything more precise than seconds, it doesn't matter which one we use. However since |
|
Thanks for your reply. I've closed this pull request. BTW, could you please have a look at issues #95 about |
|
As python 3.3 deprecate time.clock(), I'll reopen this PR and merge it. Thanks to bring this to our intention. |
replace time.clock() by time.time()
|
My pleasure |
replace time.clock() by time.time()
replace time.clock() by time.time() Former-commit-id: c12e8f2
Since time.clock() is not accurate, we'd better use time.time() instead.