I need to fix a module I was about to use (profiling). It is still using the now deprecated time.clock(). What would be a drop-in replacement line for it?
class Timer(Runnable):
"""The basic timer."""
#: The raw function to get the CPU time.
clock = time.clock
def __call__(self):
return self.clock()
def run(self, profiler):
yield
Suggested related answers ( Measure time elapsed in Python ) would not product the same return value. time.process_time()
might do it.