← Back to team overview

yade-users team mailing list archive

Re: [Question #705760]: How to get the runtime or CPU time?

 

Question #705760 on Yade changed:
https://answers.launchpad.net/yade/+question/705760

Bruno Chareyre proposed the following answer:
Python's time.time() is enough in many cases, as long as you don't need
per-engine data or nano-second accuracy.

t1 = time.time()
O.run(...)
realTime = time.time() - t1

yade.timing is convenient if you want more granularity in the timings
(you probably forgot 'from yade import timing'). You can also introduce
your own checkpoints in the source code which will be reflected in the
output of yade.timing.stats().

Bruno

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.