Mar-16-2019, 02:04 PM
Hi all,
I'm trying to time part of a code on microsecond level.
Code below shows the idea.
Result is however that the stored value on changes once every 1000 steps, I Would have expected an continuously increment of the stored value.
Must be something I'm not seeing here, can anyone assist?
I'm trying to time part of a code on microsecond level.
Code below shows the idea.
Result is however that the stored value on changes once every 1000 steps, I Would have expected an continuously increment of the stored value.
Must be something I'm not seeing here, can anyone assist?
from datetime import datetime import matplotlib.pyplot as plt log =[] a=datetime.now().microsecond for i in range(10000): b=datetime.now().microsecond log.append(b-a) plt.plot(log)Thanks,