Function to show time to execute another function
Luca Menegotto
otlucaDELETE at DELETEyahoo.it
Sun Jun 7 05:06:10 EDT 2015
Il 07/06/2015 10:22, Cecil Westerhof ha scritto:
> That only times the function. I explicitly mentioned I want both the
> needed time AND the output.
>
> Sadly the quality of the answers on this list is going down....
First of all, thank God it's a newsgroup, not a list.
Second, often the quality of an answer is deeply connected to the
quality of a question. I've red your question, and I still have not
clear what you want.
If you want a function that returns a result and a time elapsed, why
don't you pack the time and the result in a tuple, a list or a
dictionary? it takes 20 seconds, if you are slow.
Else if you want a function that prints time and result, why don't you
print result more or less in the same manner you do with the time
elapsed? it takes 20 seconds, if you are slow.
Else, can you explain exactly what do you want?
--
Ciao!
Luca
More information about the Python-list
mailing list