MCPcopy Create free account
hub / github.com/Cyinx/einx / delete_timer

Method delete_timer

timer/timer.go:73–100  ·  view source on GitHub ↗
(seqID uint32)

Source from the content-addressed store, hash-verified

71}
72
73func (this *timerList) delete_timer(seqID uint32) bool {
74 curr_head := this.head
75 var prev_head *xtimer = nil
76 for curr_head != nil {
77 if curr_head.seqID != seqID {
78 prev_head = curr_head
79 curr_head = curr_head.next
80 continue
81 }
82
83 if curr_head.running {
84 return true
85 }
86
87 if prev_head == nil {
88 this.head = curr_head.next
89 } else {
90 prev_head.next = curr_head.next
91 }
92
93 if curr_head.next == nil {
94 this.tail = prev_head
95 }
96 this.pool.Put(curr_head)
97 return true
98 }
99 return false
100}
101
102func (this *timerList) execute(now uint64, count uint32) (uint32, bool) {
103 var running_timer *xtimer = nil

Callers 1

DeleteTimerMethod · 0.45

Calls 1

PutMethod · 0.45

Tested by

no test coverage detected