aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/clocksync.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/clocksync.py')
-rw-r--r--klippy/clocksync.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/klippy/clocksync.py b/klippy/clocksync.py
index 5dffc215..ada09256 100644
--- a/klippy/clocksync.py
+++ b/klippy/clocksync.py
@@ -131,6 +131,9 @@ class ClockSync:
def get_clock(self, eventtime):
sample_time, clock, freq = self.clock_est
return int(clock + (eventtime - sample_time) * freq)
+ def estimate_clock_systime(self, reqclock):
+ sample_time, clock, freq = self.clock_est
+ return float(reqclock - clock)/freq + sample_time
def estimated_print_time(self, eventtime):
return self.clock_to_print_time(self.get_clock(eventtime))
# misc commands