Ahmed AL-Masri wrote:
Hi,
I would calculate the running time of my simulation code.
any one know how to do that?
example def demo():
    ########### the starting point of time should be 0
     f.simulate(data)
    ########### the end of the class so need to find the time in Sec.?
    ########### print time in sec.
if __name__ == '__main__':
    demo()
look forward to seeing the answer, Thanks a lot,
A. Naufal
------------------------------------------------------------------------

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

You can take a look at the timeit module [1] and some nice examples [2].

[1] http://docs.python.org/library/timeit.html
[2] http://www.doughellmann.com/PyMOTW/timeit/

--
Kind Regards,
Christian Witts


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to