Closed link2xt closed 5 years ago
Sorry for the delayed reply.
I think we should keep the code Python 2 compatible, even the examples, at least until Python 2 has reached its end-of-life by the end of the year. As clock
will be removed in Python 3.8 and 3.8 is scheduled to be released in Oktober, we can't just wait for Python 2 to be retired before changing this. :)
Could you update the pull request to make the use of clock
or perf_counter
dependent on whether perf_counter
is available? e.g. something like:
try:
from time import perf_counter
except ImportError:
from time import clock as perf_counter
@FlorianRhiem Added Python 2 compatibility and rebased.
Thank you, we've merged the commits into the develop branch and they'll be in the next release.
time.clock() is deprecated since Python 3.3.