How to compute the time-average values on the fly?

When defaultclock.dt=0.01*ms, the elapsed time for Case 2 is 44 second for Network operation and 19 second for run_regularly. As a result, run_regularly is preferred for a smaller time step.