This commit is contained in:
Joeri Exelmans 2024-11-28 23:47:19 +01:00
commit 8a24549cdb
21 changed files with 3478 additions and 0 deletions

View file

@ -0,0 +1,13 @@
from lib.realtime.event_loop import AbstractEventLoop
# schedules calls in an existing tkinter eventloop
class TkEventLoopAdapter(AbstractEventLoop):
def __init__(self, tk):
self.tk = tk
def schedule(self, delay, callback):
return self.tk.after(int(delay / 1000000), # ns to ms
callback)
def cancel(self, timer):
self.tk.after_cancel(timer)