MCPcopy Create free account
hub / github.com/DNAProject/DNA / CancelTimer

Method CancelTimer

consensus/vbft/event_timer.go:147–155  ·  view source on GitHub ↗
(idx uint32)

Source from the content-addressed store, hash-verified

145}
146
147func (self *EventTimer) CancelTimer(idx uint32) {
148 self.lock.Lock()
149 defer self.lock.Unlock()
150
151 if t, present := self.normalTimers[idx]; present {
152 t.Stop()
153 delete(self.normalTimers, idx)
154 }
155}
156
157func (self *EventTimer) getEventTimeout(evtType TimerEventType) time.Duration {
158 switch evtType {

Callers 1

TestCancelTimerFunction · 0.80

Calls 1

StopMethod · 0.65

Tested by 1

TestCancelTimerFunction · 0.64