From e073beb88bcc37570729ad673910b0d3bf06bfec Mon Sep 17 00:00:00 2001 From: Hassanpour fateme <51415176+hspfatemeh@users.noreply.github.com> Date: Thu, 13 Nov 2025 15:24:44 +0330 Subject: [PATCH] Replace time.clock() with time.process_time() --- attic_util/time_benchmark.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/attic_util/time_benchmark.py b/attic_util/time_benchmark.py index 8122bd8..4e8f74f 100644 --- a/attic_util/time_benchmark.py +++ b/attic_util/time_benchmark.py @@ -4,7 +4,7 @@ class Benchmark(): def __init__(self): self.time_wall_start = time.time() - self.time_cpu_start = time.clock() + self.time_cpu_start = time.process_time() self.logger = logbook.Logger(self.__class__.__name__) def diff_time_wall_secs(self): @@ -14,5 +14,5 @@ def print_time(self, label=''): self.logger.info("%s wall=%.3fm cpu=%.3fm" % ( label, self.diff_time_wall_secs() / 60.0, - (time.clock() - self.time_cpu_start) / 60.0, + (time.process_time() - self.time_cpu_start) / 60.0, ))