Removed a couple of Debug.Printf()s
This commit is contained in:
1 parent
9284366a3d
commit
ba2f6671a6
1 file changed
+2
-3
@@ -5,8 +5,9 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/benbjohnson/clock"
|
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
|
"github.com/benbjohnson/clock"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A callable is a function that is called and return an (optional) next scheduled time
|
// A callable is a function that is called and return an (optional) next scheduled time
|
||||||
@@ -86,7 +87,6 @@ func (cq *SchedQueue) Start() {
|
|||||||
case ce := <-cq.schedChan:
|
case ce := <-cq.schedChan:
|
||||||
heap.Push(&cq.callablesH, ce)
|
heap.Push(&cq.callablesH, ce)
|
||||||
now = cq.clock.Now()
|
now = cq.clock.Now()
|
||||||
Debug.Printf("[sched-q] Call scheduled [len:%d]", len(cq.callablesH))
|
|
||||||
case <-cq.closeChan:
|
case <-cq.closeChan:
|
||||||
return
|
return
|
||||||
case now = <-timer.C:
|
case now = <-timer.C:
|
||||||
@@ -101,7 +101,6 @@ func (cq *SchedQueue) Start() {
|
|||||||
schedNextTime := sched.c()
|
schedNextTime := sched.c()
|
||||||
|
|
||||||
if !schedNextTime.IsZero() {
|
if !schedNextTime.IsZero() {
|
||||||
Debug.Printf("[sched-q] Re-scheduled at %s", schedNextTime)
|
|
||||||
sched.t = schedNextTime
|
sched.t = schedNextTime
|
||||||
heap.Push(&cq.callablesH, sched) // TODO: use a Fix() instead of Pop()&Push()
|
heap.Push(&cq.callablesH, sched) // TODO: use a Fix() instead of Pop()&Push()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user