From 4cd786fe087580d6370f9b8bccebd6c39de84bca Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 30 Sep 2025 20:16:27 -0400 Subject: [PATCH] toolhead: Avoid pausing an infinitesimal amount of time Due to differences in mcu clock vs system clock it's possible to repeatedly underestimate a system delay needed to bring about a sufficient mcu time - which just wastes cpu cycles retrying a pause. It's okay to sleep a slightly longer time to avoid the issue. Signed-off-by: Kevin O'Connor --- klippy/toolhead.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/klippy/toolhead.py b/klippy/toolhead.py index 6326e607f..cf545d127 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -337,7 +337,8 @@ class ToolHead: if not self.can_pause: self.need_check_pause = self.reactor.NEVER return - eventtime = self.reactor.pause(eventtime + min(1., pause_time)) + eventtime = self.reactor.pause( + eventtime + max(.005, min(1., pause_time))) est_print_time = self.mcu.estimated_print_time(eventtime) buffer_time = self.print_time - est_print_time if not self.special_queuing_state: