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

@ -32,7 +32,7 @@ bittrex:
left: 2
height: 3
width: 1
updateInterval: 5
refreshInterval: 5
summary:
BTC:
displayName: Bitcoin
@ -80,6 +80,6 @@ Values: `true`, `false`.
`position` <br />
Defines where in the grid this module's widget will be displayed. <br />
`updateInterval` <br />
`refreshInterval` <br />
How often, in seconds, this module will update its data. <br />
Values: A positive integer, `0..n`.

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
}
@ -45,7 +44,6 @@ func NewWidget() *Widget {
widget := Widget{
TextWidget: wtf.NewTextWidget(" $ Bittrex ", "bittrex", false),
summaryList: summaryList{},
updateInterval: Config.UInt("wtf.mods.bittrex.updateInterval", 10),
}
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

View File

@ -180,7 +180,7 @@
</span><span class="w"> </span>left<span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w">
</span><span class="w"> </span>height<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">1</span><span class="w">
</span><span class="w"> </span>updateInterval<span class="p">:</span><span class="w"> </span><span class="m">15</span><span class="w">
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">15</span><span class="w">
</span><span class="w"> </span>summary<span class="p">:</span><span class="w"> </span><span class="w">
</span><span class="w"> </span>BTC<span class="p">:</span><span class="w">
</span><span class="w"> </span>displayName<span class="p">:</span><span class="w"> </span><span class="m">Bitcoin</span><span class="w">