Skip to content

Commit

Permalink
[Fix] time.clock() deprecated in Python 3.8
Browse files Browse the repository at this point in the history
Replaced all calls to time.clock() with time.perf_counter().

time.clock() has been removed from the time module in Python 3.8.
  • Loading branch information
marco97pa committed Dec 14, 2020
1 parent 38a98d4 commit b0d6b70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ def process_queue(self):
add_block() or remove_block() was called with immediate=False
"""
start = time.clock()
while self.queue and time.clock() - start < 1.0 / TICKS_PER_SEC:
start = time.perf_counter()
while self.queue and time.perf_counter() - start < 1.0 / TICKS_PER_SEC:
self._dequeue()

def process_entire_queue(self):
Expand Down

0 comments on commit b0d6b70

Please # to comment.