else:
self.__idleId = gobject.idle_add(self.__func)
+ def is_running(self):
+ return self.__idleId is not None
+
def cancel(self):
if self.__idleId is not None:
gobject.source_remove(self.__idleId)
else:
timeout_add_seconds(timeoutInSeconds, self._on_once)
+ def is_running(self):
+ return self.__timeoutId is not None
+
def cancel(self):
if self.__timeoutId is not None:
gobject.source_remove(self.__timeoutId)