Replaced all calls to time.clock() with time.perf_counter().
time.clock() has been removed from the time module in Python 3.8.
This PR closes #108 and makes the app executable again on Python 3.8+
Tested on my Windows machine with Python 3.8
Before the fix, the app was crashing unexpectedly with the following Traceback:
File "main.py", line 902, in <module>
main()
File "main.py", line 898, in main
pyglet.app.run()
File "C:\Users\***\AppData\Roaming\Python\Python38\site-packages\pyglet\app\__init__.py", line 107, in run
event_loop.run()
File "C:\Users\***\AppData\Roaming\Python\Python38\site-packages\pyglet\app\base.py", line 167, in run
timeout = self.idle()
File "C:\Users\***\AppData\Roaming\Python\Python38\site-packages\pyglet\app\base.py", line 237, in idle
redraw_all = self.clock.call_scheduled_functions(dt)
File "C:\Users\***\AppData\Roaming\Python\Python38\site-packages\pyglet\clock.py", line 292, in call_scheduled_functions
item.func(now - item.last_ts, *item.args, **item.kwargs)
File "main.py", line 571, in update
self.model.process_queue()
File "main.py", line 422, in process_queue
start = time.clock()
Replaced all calls to
time.clock()
withtime.perf_counter()
.time.clock()
has been removed from thetime
module in Python 3.8.This PR closes #108 and makes the app executable again on Python 3.8+
Tested on my Windows machine with Python 3.8
Before the fix, the app was crashing unexpectedly with the following Traceback: