what is the difference between time.perf_counter() and time.process_time()? : <p>I am using Jupyter notebook. I'm trying to measure how long will it take to count the Avogadro's number with python. I found that <code>time.perf_counter()</code> and <code>time.process_time()</code> modules will be useful for this kind of work. So I tried both of them, but the result was totally different. What makes this kind of difference? Here are my codes.</p>

<pre><code>import time

a = 10 ** 5

def AvogadroCounting():
    i = 0
    while i &lt;= a:
        i += 1

AvogadroCounting()

t_fract = time.perf_counter()  #time to count fraction of avogadro's number in Seconds


print(t_fract, 'secs')
</code></pre>

<p>and my notebook gives 693920.393636181 secs.</p>

<pre><code>import time

a = 10 ** 5

def AvogadroCounting():
    i = 0
    while i &lt;= a:
        i += 1

AvogadroCounting()

t_fract =  time.process_time()  #time to count fraction of avogadro's number in Seconds


print(t_fract, 'secs')
</code></pre>

<p>and this gives 2048.768273 secs.</p>
