From 8070e1e3efbe5d182c7f4eef1cad1658a30e8860 Mon Sep 17 00:00:00 2001 From: Osmani Rosado-Falcon Date: Thu, 15 Feb 2024 14:18:49 -0500 Subject: [PATCH] The clock function was removed from time module in Python 3.8 --- framework/pym/play/commands/modulesrepo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/pym/play/commands/modulesrepo.py b/framework/pym/play/commands/modulesrepo.py index 25dd8336b5..aa99c98e97 100644 --- a/framework/pym/play/commands/modulesrepo.py +++ b/framework/pym/play/commands/modulesrepo.py @@ -93,7 +93,7 @@ def __init__(self, width=55): def retrieve(self, url, destination, callback=None): self.size = 0 - time.clock() + time.perf_counter() try: headers={'User-Agent':DEFAULT_USER_AGENT, 'Accept': 'application/json' @@ -154,7 +154,7 @@ def progress(self, bytes_so_far, blocksize, filesize): done = 100 bar = self.bar(bytes_so_far, filesize, done) if not self.cycles % 3 and bits != filesize: - now = time.clock() + now = time.perf_counter() elapsed = now-self.before if elapsed: speed = self.kibi(blocksize * 3 // elapsed)