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

Method execute

timer/timer.go:102–125  ·  view source on GitHub ↗
(now uint64, count uint32)

Source from the content-addressed store, hash-verified

100}
101
102func (this *timerList) execute(now uint64, count uint32) (uint32, bool) {
103 var running_timer *xtimer = nil
104 run_count := uint32(0)
105
106 for ; this.head != nil; run_count++ {
107
108 running_timer = this.head
109 if run_count >= count || running_timer.runTick > now {
110 return run_count, false
111 }
112
113 running_timer = this.head
114 running_timer.running = true
115 running_timer.handler(running_timer.args)
116 this.head = running_timer.next
117 this.pool.Put(running_timer)
118 }
119
120 if this.head == nil {
121 this.tail = nil
122 }
123
124 return run_count, true
125}

Callers 1

ExecuteMethod · 0.45

Calls 1

PutMethod · 0.45

Tested by

no test coverage detected