From aff05fedf918a9500a597e89a26be62277ad717d Mon Sep 17 00:00:00 2001 From: Aswin Date: Thu, 3 Sep 2020 13:07:49 +0530 Subject: [PATCH] time.clock() does not work for python 3.8 onwards. Replaced it with time.process_time() --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 main.py diff --git a/main.py b/main.py old mode 100644 new mode 100755 index b0590ad9..f709e2dc --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from __future__ import division import sys @@ -419,8 +420,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.process_time() + while self.queue and time.process_time() - start < 1.0 / TICKS_PER_SEC: self._dequeue() def process_entire_queue(self):