##// END OF EJS Templates
Fix %timeit for slow functions, by Prabhu Ramachandran....
Prabhu Ramachandran -
Show More
@@ -1865,9 +1865,9 b' Currently the magic system has the following functions:\\n"""'
1865 # determine number so that 0.2 <= total time < 2.0
1865 # determine number so that 0.2 <= total time < 2.0
1866 number = 1
1866 number = 1
1867 for i in range(1, 10):
1867 for i in range(1, 10):
1868 number *= 10
1869 if timer.timeit(number) >= 0.2:
1868 if timer.timeit(number) >= 0.2:
1870 break
1869 break
1870 number *= 10
1871
1871
1872 best = min(timer.repeat(repeat, number)) / number
1872 best = min(timer.repeat(repeat, number)) / number
1873
1873
General Comments 0
You need to be logged in to leave comments. Login now