A
alx__21
Hi,
I'm looking for something that is like eval in that it can compile and
run code from strings, but will quit after a maximum given time.
The benchmark module tool "timethis" is very close, but it can only
ever specify a minimum time to iterate the given code. What I want is
code that iterates ONCE, breaking at a maximum time that I can specify
(if it runs that long).
If anybody knows of a function to do this I would appreciate it. I
would rather not have to start digging around in the source for
timethis to create my own.
Thanks.
I'm looking for something that is like eval in that it can compile and
run code from strings, but will quit after a maximum given time.
The benchmark module tool "timethis" is very close, but it can only
ever specify a minimum time to iterate the given code. What I want is
code that iterates ONCE, breaking at a maximum time that I can specify
(if it runs that long).
If anybody knows of a function to do this I would appreciate it. I
would rather not have to start digging around in the source for
timethis to create my own.
Thanks.