Skip to content

Commit

Permalink
Replace timer with ticker
Browse files Browse the repository at this point in the history
  • Loading branch information
aalda committed Nov 28, 2018
1 parent d457f10 commit e198f1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gossip/monitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type Monitor struct {

taskCh chan *QueryTask
quitCh chan bool
executionTicker *time.Timer
executionTicker *time.Ticker
}

func NewMonitor(conf *Config) (*Monitor, error) {
Expand Down Expand Up @@ -84,7 +84,7 @@ func (m Monitor) Process(b *protocol.BatchSnapshots) {
}

func (m *Monitor) runTaskDispatcher() {
m.executionTicker = time.NewTimer(m.conf.TaskExecutionInterval)
m.executionTicker = time.NewTicker(m.conf.TaskExecutionInterval)
for {
select {
case <-m.executionTicker.C:
Expand Down

0 comments on commit e198f1c

Please sign in to comment.