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, ))