Ejemplo n.º 1
0
 def _timer_start(self):
     self._timer_stop()
     if self._single:
         self._timer = window.setTimeout(self._on_timer, self.interval)
     else:
         self._timer = window.setInterval(self._on_timer, self.interval)
Ejemplo n.º 2
0
 def draw_idle(self):
     if not self._idle_scheduled:
         self._idle_scheduled = True
         window.setTimeout(self.draw, 1)
Ejemplo n.º 3
0
 def call_soon(self, callback, *args, context=None):
     handle = asyncio.Handle(callback, args, self, context=context)
     window.setTimeout(handle._run)
     return handle
Ejemplo n.º 4
0
 def call_later(self, when, callback, *args, context=None):
     handle = asyncio.Handle(callback, args, self, context=context)
     window.setTimeout(handle._run, when * 1000.0)
     return handle
Ejemplo n.º 5
0
 def schedule_search(self):
     if self.timeout is not None:
         window.clearTimeout(self.timeout)
     self.timeout = window.setTimeout(self.search, 1000)