MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / countdown

Method countdown

example_code/item_109.py:80–83  ·  view source on GitHub ↗
(self, duration, callback)

Source from the content-addressed store, hash-verified

78 self.timer = None
79
80 def countdown(self, duration, callback):
81 self.end()
82 self.timer = threading.Timer(duration, callback)
83 self.timer.start()
84
85 def end(self):
86 if self.timer:

Callers 3

test_countdownMethod · 0.95
test_endMethod · 0.95
push_downMethod · 0.80

Calls 1

endMethod · 0.95

Tested by 2

test_countdownMethod · 0.76
test_endMethod · 0.76