timeit unit select breaks with >= 1000second duration
[Note - fperez: Reported by David Warde-Farley, patch is his; don't forget to credit in commit log when applying]
This is a minor concern since I don't know how many people use timeit for things that take more than a few seconds but I noticed that if you have a function that runs for say, 1000 seconds, the code in Magic.py fails since 'order' gets a negative number. Thus you get something like 1.0e12 nanoseconds being printed, which is kind of silly.
Attached is a patch that fixes it in the simplest way possible: if best is >= 1000 then just use seconds, e.g.
In : %timeit -n 1 -r 1 time.sleep(1000)
1 loops, best of 1: 1e+03 s per loop
See here for further details: