|
|
@ -508,12 +508,18 @@ class Timer(object):
|
|
|
|
self.when = when
|
|
|
|
self.when = when
|
|
|
|
self.func = func
|
|
|
|
self.func = func
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
|
|
|
|
return 'Timer(%r, %r)' % (self.when, self.func)
|
|
|
|
|
|
|
|
|
|
|
|
def __eq__(self, other):
|
|
|
|
def __eq__(self, other):
|
|
|
|
return self.when == other.when
|
|
|
|
return self.when == other.when
|
|
|
|
|
|
|
|
|
|
|
|
def __lt__(self, other):
|
|
|
|
def __lt__(self, other):
|
|
|
|
return self.when < other.when
|
|
|
|
return self.when < other.when
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def __le__(self, other):
|
|
|
|
|
|
|
|
return self.when <= other.when
|
|
|
|
|
|
|
|
|
|
|
|
def cancel(self):
|
|
|
|
def cancel(self):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Cancel this event. If it has not yet executed, it will not execute
|
|
|
|
Cancel this event. If it has not yet executed, it will not execute
|
|
|
|