0

I want to know how I can time the execution of a module with greater precision than what is provided by the time module i.e. with greater than 0.1 second resolution

Here is my code:

>>>import eosClass_steff_test2 as mod;

>>>import srk as typeEOS

>>>import benzene as typeMolecule

>>>import time

>>>benzsrk=mod.EOS(typeEOS,typeMolecule)

>>>start = time.time()

>>>benzsrk.Z(300,20)

>>>print ('It took', time.time()-start , 'seconds.')`
Alfred Huang
  • 17,654
  • 32
  • 118
  • 189
Pearl Philip
  • 883
  • 2
  • 11
  • 16
  • 2
    your question is identical with this: http://stackoverflow.com/questions/8889083/how-to-time-execution-time-of-a-batch-of-code-in-python – Alfred Huang Jun 10 '14 at 07:34
  • @fish_ball, I would say it's identical to [this one](http://stackoverflow.com/questions/85451/python-time-clock-vs-time-time-accuracy) – J0HN Jun 10 '14 at 07:40
  • Thanks guys. But I have Python 2.7, so those function don't apply. – Pearl Philip Jun 11 '14 at 05:28

0 Answers0