replace time.NewTicker().C with time.After

They are synonymous and time.After is much easier to read.
This commit is contained in:
Jimmy Zelinskie
2016-01-08 15:55:10 -05:00
parent 9825a69ac7
commit 29c206611e
3 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ func (tkr *Tracker) purgeInactivePeers(purgeEmptyTorrents bool, threshold, inter
case <-tkr.shuttingDown:
return
case <-time.NewTicker(interval).C:
case <-time.After(interval):
before := time.Now().Add(-threshold)
glog.V(0).Infof("Purging peers with no announces since %s", before)