From 7603d7fac72d37089f73c59048417fab9268281d 2018-10-15 23:27:27 From: ammarmallik Date: 2018-10-15 23:27:27 Subject: [PATCH] Replace deprecated time.time() with time.perf_counter() issue#11375 --- diff --git a/IPython/core/magics/execution.py b/IPython/core/magics/execution.py index d04ace8..152950e 100644 --- a/IPython/core/magics/execution.py +++ b/IPython/core/magics/execution.py @@ -915,7 +915,7 @@ python-profiler package from non-free.""") Number of times to execute `run`. """ - twall0 = time.time() + twall0 = time.perf_counter() if nruns == 1: t0 = clock2() run() @@ -938,7 +938,7 @@ python-profiler package from non-free.""") print(" Times : %10s %10s" % ('Total', 'Per run')) print(" User : %10.2f s, %10.2f s." % (t_usr, t_usr / nruns)) print(" System : %10.2f s, %10.2f s." % (t_sys, t_sys / nruns)) - twall1 = time.time() + twall1 = time.perf_counter() print("Wall time: %10.2f s." % (twall1 - twall0)) @skip_doctest