1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

replaced updateInterval with refreshInterval

This commit is contained in:
Hossein Mehrabi
2018-06-04 20:59:07 +04:30
committed by Chris Cummer
parent f381e130bb
commit 57e3a01b3a
3 changed files with 6 additions and 8 deletions

View File

@@ -35,7 +35,6 @@ var baseURL = "https://bittrex.com/api/v1.1/public/getmarketsummary"
type Widget struct {
wtf.TextWidget
summaryList
updateInterval int
TextColors
}
@@ -43,9 +42,8 @@ type Widget struct {
func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" $ Bittrex ", "bittrex", false),
summaryList: summaryList{},
updateInterval: Config.UInt("wtf.mods.bittrex.updateInterval", 10),
TextWidget: wtf.NewTextWidget(" $ Bittrex ", "bittrex", false),
summaryList: summaryList{},
}
started = false
@@ -112,7 +110,7 @@ func (widget *Widget) Refresh() {
go func() {
for {
widget.updateSummary()
time.Sleep(time.Second * time.Duration(widget.updateInterval))
time.Sleep(time.Second * time.Duration(widget.RefreshInterval()))
}
}()
started = true