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

**URL:** <https://brian.discourse.group/t/how-to-compute-the-time-average-values-on-the-fly/1356>\
**Category:** Support\
**Tags:** user-function\
**Created:** [28 December 2024 07:43 UTC](https://brian.discourse.group/t/how-to-compute-the-time-average-values-on-the-fly/1356 "2024-12-28T07:43:29Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Jasmine9691](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/jasmine9691/32/811_2.png) [@Jasmine9691](https://brian.discourse.group/u/Jasmine9691)\
**Post date:** [24 March 2025 05:18 UTC](https://brian.discourse.group/t/how-to-compute-the-time-average-values-on-the-fly/1356/9 "2025-03-24T05:18:01Z")

</div>

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.

---

_[View the full topic](https://brian.discourse.group/t/how-to-compute-the-time-average-values-on-the-fly/1356)._
