def consume(self):
    was_set = self.evt.is_set()
if was_set:
    self.evt.clear()
return was_set

def run(self):
    """The internal main method of this thread. Block for :attr:`interval`
    seconds before setting :attr:`Ticker.evt`
    .. warning::
      Do not call this directly!  Instead call :meth:`start`.
    """
while self.should_run.is_set():
    time.sleep(self.interval)
self.evt.set()
python: windows equivalent of SIGALRM