diff --git a/brian2/core/clocks.py b/brian2/core/clocks.py index 338b4f8bf..b1688a328 100644 --- a/brian2/core/clocks.py +++ b/brian2/core/clocks.py @@ -37,8 +37,7 @@ def check_dt(new_dt, old_dt, target_t): ------ ValueError If using the new dt value would lead to a difference in the target - time of more than `Clock.epsilon_dt` times ``new_dt`` (by default, - 0.01% of the new dt). + time of more than `Clock.epsilon_dt` (by default, 10ns). Examples -------- @@ -53,7 +52,7 @@ def check_dt(new_dt, old_dt, target_t): old_t = np.int64(np.round(target_t / old_dt)) * old_dt new_t = np.int64(np.round(target_t / new_dt)) * new_dt error_t = target_t - if abs(new_t - old_t)/new_dt > Clock.epsilon_dt: + if abs(new_t - old_t) > Clock.epsilon_dt: raise ValueError(('Cannot set dt from {old} to {new}, the ' 'time {t} is not a multiple of ' '{new}').format(old=str(old_dt * second), @@ -75,10 +74,8 @@ class Clock(VariableOwner): Notes ----- Clocks are run in the same `Network.run` iteration if `~Clock.t` is the - same. The condition for two - clocks to be considered as having the same time is - ``abs(t1-t2)