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:
parent
8d26cfd2cb
commit
f74feb329a
@ -21,9 +21,6 @@ var ok = true
|
|||||||
type Widget struct {
|
type Widget struct {
|
||||||
wtf.TextWidget
|
wtf.TextWidget
|
||||||
|
|
||||||
// time interval for send http request
|
|
||||||
updateInterval int
|
|
||||||
|
|
||||||
*list
|
*list
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,7 +29,6 @@ func NewWidget() *Widget {
|
|||||||
started = false
|
started = false
|
||||||
widget := Widget{
|
widget := Widget{
|
||||||
TextWidget: wtf.NewTextWidget(" CryptoLive ", "cryptolive", false),
|
TextWidget: wtf.NewTextWidget(" CryptoLive ", "cryptolive", false),
|
||||||
updateInterval: Config.UInt("wtf.mods.cryptolive.updateInterval", 10),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
widget.setList()
|
widget.setList()
|
||||||
@ -66,7 +62,7 @@ func (widget *Widget) Refresh() {
|
|||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
widget.updateCurrencies()
|
widget.updateCurrencies()
|
||||||
time.Sleep(time.Duration(widget.updateInterval) * time.Second)
|
time.Sleep(time.Duration(widget.RefreshInterval()) * time.Second)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user