title: How to measure cpu time of Python code takes long time to run both in Linux/Win?
body: <p>My Python code takes a long time to run(around 12 hours), is it possible to measure the cpu time it takes to run from its beginning to the end and also measure some part in the code in both Linux and Windows system?</p>
  
  <p>The cluster I'm using is used by many other users, so I want to measure cpu time to see the time my code takes. Wall clock time is not accurate in my case. so I cannot use time.time(). </p>
  
  <p>From my understanding timeit module is not useful, as it works for a small snippet, please correct me if it's wrong. Is there any other module that I can use?</p>
  
  <p>Any answer would be appreciate. </p>