Show More
@@ -915,7 +915,7 b' python-profiler package from non-free.""")' | |||
|
915 | 915 | Number of times to execute `run`. |
|
916 | 916 | |
|
917 | 917 | """ |
|
918 |
twall0 = time.t |
|
|
918 | twall0 = time.perf_counter() | |
|
919 | 919 | if nruns == 1: |
|
920 | 920 | t0 = clock2() |
|
921 | 921 | run() |
@@ -938,7 +938,7 b' python-profiler package from non-free.""")' | |||
|
938 | 938 | print(" Times : %10s %10s" % ('Total', 'Per run')) |
|
939 | 939 | print(" User : %10.2f s, %10.2f s." % (t_usr, t_usr / nruns)) |
|
940 | 940 | print(" System : %10.2f s, %10.2f s." % (t_sys, t_sys / nruns)) |
|
941 |
twall1 = time.t |
|
|
941 | twall1 = time.perf_counter() | |
|
942 | 942 | print("Wall time: %10.2f s." % (twall1 - twall0)) |
|
943 | 943 | |
|
944 | 944 | @skip_doctest |
@@ -58,13 +58,13 b' try:' | |||
|
58 | 58 | return resource.getrusage(resource.RUSAGE_SELF)[:2] |
|
59 | 59 | except ImportError: |
|
60 | 60 | # There is no distinction of user/system time under windows, so we just use |
|
61 |
# time. |
|
|
62 |
clocku = clocks = clock = time. |
|
|
61 | # time.perff_counter() for everything... | |
|
62 | clocku = clocks = clock = time.perf_counter | |
|
63 | 63 | def clock2(): |
|
64 | 64 | """Under windows, system CPU time can't be measured. |
|
65 | 65 | |
|
66 |
This just returns |
|
|
67 |
return time. |
|
|
66 | This just returns perf_counter() and zero.""" | |
|
67 | return time.perf_counter(),0.0 | |
|
68 | 68 | |
|
69 | 69 | |
|
70 | 70 | def timings_out(reps,func,*args,**kw): |
General Comments 0
You need to be logged in to leave comments.
Login now