MCPcopy
hub / github.com/aosabook/500lines / set_timer

Method set_timer

cluster/code/cluster.py:149–151  ·  view source on GitHub ↗
(self, seconds, callback)

Source from the content-addressed store, hash-verified

147 self.logger = node.logger.getChild(type(self).__name__)
148
149 def set_timer(self, seconds, callback):
150 return self.node.network.set_timer(self.node.address, seconds,
151 lambda: self.running and callback())
152
153 def stop(self):
154 self.running = False

Callers 14

do_sequenceFunction · 0.45
leader_aliveMethod · 0.45
startMethod · 0.45
send_prepareMethod · 0.45
activeMethod · 0.45
joinMethod · 0.45
do_JoinMethod · 0.45
startMethod · 0.45
test_timeoutMethod · 0.45
test_cancel_timeoutMethod · 0.45
test_two_requestsMethod · 0.45

Calls 1

callbackFunction · 0.85

Tested by 6

test_timeoutMethod · 0.36
test_cancel_timeoutMethod · 0.36
test_two_requestsMethod · 0.36
test_failed_nodesMethod · 0.36
test_failed_leaderMethod · 0.36