Skip to content

Commit

Permalink
FIX: negative sleep time
Browse files Browse the repository at this point in the history
  • Loading branch information
schwabix-1311 committed Nov 22, 2024
1 parent e24b583 commit 74cd294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aquaPi/machineroom/out_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def toggle_and_wait(state: bool, end: float) -> bool:
self._thread_stop = False
return False
time.sleep(.1)
time.sleep(end - time.time())
time.sleep(max(0, end - time.time()))
log.debug(' _pulse needed %f instead of %f',
time.time() - start, end - start)
return True
Expand Down

0 comments on commit 74cd294

Please sign in to comment.