def start(self, callback, *args, **kwargs): self.callback = callback self.args = args self._libev_unref() if kwargs.get('update'): libev.ev_now_update(self.loop._ptr) libev.ev_timer_start(self.loop._ptr, pointer(self._watcher_struct))
def again(self, callback, update=True, *args): self.callback = callback self.args = args self._libev_unref() if update: libev.ev_now_update(self.loop._ptr) libev.ev_timer_again(self.loop._ptr, pointer(self._watcher_struct))
def update(self): libev.ev_now_update(self._ptr)