You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function time.clock() has been removed, after having been deprecated since Python 3.3:
use time.perf_counter() or time.process_time() instead, depending on your requirements,
to have well-defined behavior. (Contributed by Matthias Bussonnier in bpo-36895.)
Microsoft Windows 7 x64
Python 3.8.1 x64
------------------------------------------
Timeit Test - 1000000 times
Test1:[0.20428928500000154, 0.1874606649999997, 0.1864975280000003, 0.18765649500000237, 0.18984756899999766]
Test2:[0.45273342399999805, 0.45695258800000005, 0.45270879199999925, 0.4579686850000009, 0.45511786500000184]
Winner: Test1
Loser: Test2
And the alternative Py2 test just to see test results diff on 2/3 and x32/x64.
defTest1():
t=time.clock()
Microsoft Windows 7 x64
Python 2.7.17 x32
------------------------------------------
Timeit Test - 1000000 times
Test1:[0.1861580078093728, 0.16879239639197288, 0.1702609131900069]
It appears time.perf_counter() is the function we want to replace time.clock() with.
The purposed fix in framemanager.py:
Since python 2 is depricated now, 3 will become more popular, so hotpatch py2 since phoenix didn't run on less than py3.3 anyhow.
In framemanager.py imports section
importtimeimportsysifsys.version_info[0] ==2: # hotpatch clock which is removed in py3.8time.perf_counter=time.clock
In framemanager.py AddPane1 method
# if the pane's name identifier is blank, create a random stringifpinfo.name==""oralready_exists:
pinfo.name= ("%s%08x%08x%08x") % (pinfo.window.GetName(), int(time.time()),
int(time.perf_counter()), len(self._panes))
@RobinD42 I've tested this on 2and3 in my agw copy. Does this look good to you to submit a PullREQz?
The text was updated successfully, but these errors were encountered:
time.clock() has been deprecated in py3.3 and removed in py3.8
https://docs.python.org/3/whatsnew/3.8.html
timeit test on py3
And the alternative Py2 test just to see test results diff on 2/3 and x32/x64.
It appears time.perf_counter() is the function we want to replace time.clock() with.
The purposed fix in framemanager.py:
Since python 2 is depricated now, 3 will become more popular, so hotpatch py2 since phoenix didn't run on less than py3.3 anyhow.
In framemanager.py imports section
In framemanager.py AddPane1 method
@RobinD42 I've tested this on 2and3 in my agw copy. Does this look good to you to submit a PullREQz?
The text was updated successfully, but these errors were encountered: