1
0
mirror of https://github.com/JoelBender/bacpypes synced 2025-10-27 00:57:47 +08:00

clip the delta to be no more than the spin value #152

This commit is contained in:
Joel Bender
2017-12-12 18:48:32 -05:00
parent 5b58c3f1bc
commit d316111a06
3 changed files with 9 additions and 0 deletions

View File

@@ -144,6 +144,9 @@ def run(spin=SPIN, sigterm=stop, sigusr1=print_stack):
time.sleep(sleeptime)
delta -= sleeptime
# delta should be no more than the spin value
delta = min(delta, spin)
# if there are deferred functions, use a small delta
if deferredFns:
delta = min(delta, 0.001)