Skip to content

Commit

Permalink
move debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Terry-Mao committed Dec 12, 2015
1 parent d9d721e commit 81ef897
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions comet/timer.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ func (t *Timer) Add(expire time.Duration, closer io.Closer) (td *TimerData, err
t.add(td)
}
t.lock.Unlock()
if Debug {
log.Debug("timer: push item key: %s, expire: %s, index: %d", td.Key, td.ExpireString(), td.index)
}
return
}

Expand All @@ -108,9 +111,6 @@ func (t *Timer) add(td *TimerData) {
// add to the minheap last node
t.timers[t.cur] = td
t.up(t.cur)
if Debug {
log.Debug("timer: push item key: %s, expire: %s, index: %d", td.Key, td.ExpireString(), td.index)
}
return
}

Expand Down

0 comments on commit 81ef897

Please sign in to comment.