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
f381e130bb
commit
57e3a01b3a
@ -32,7 +32,7 @@ bittrex:
|
|||||||
left: 2
|
left: 2
|
||||||
height: 3
|
height: 3
|
||||||
width: 1
|
width: 1
|
||||||
updateInterval: 5
|
refreshInterval: 5
|
||||||
summary:
|
summary:
|
||||||
BTC:
|
BTC:
|
||||||
displayName: Bitcoin
|
displayName: Bitcoin
|
||||||
@ -80,6 +80,6 @@ Values: `true`, `false`.
|
|||||||
`position` <br />
|
`position` <br />
|
||||||
Defines where in the grid this module's widget will be displayed. <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 />
|
How often, in seconds, this module will update its data. <br />
|
||||||
Values: A positive integer, `0..n`.
|
Values: A positive integer, `0..n`.
|
||||||
|
@ -35,7 +35,6 @@ var baseURL = "https://bittrex.com/api/v1.1/public/getmarketsummary"
|
|||||||
type Widget struct {
|
type Widget struct {
|
||||||
wtf.TextWidget
|
wtf.TextWidget
|
||||||
summaryList
|
summaryList
|
||||||
updateInterval int
|
|
||||||
TextColors
|
TextColors
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,9 +42,8 @@ type Widget struct {
|
|||||||
func NewWidget() *Widget {
|
func NewWidget() *Widget {
|
||||||
|
|
||||||
widget := Widget{
|
widget := Widget{
|
||||||
TextWidget: wtf.NewTextWidget(" $ Bittrex ", "bittrex", false),
|
TextWidget: wtf.NewTextWidget(" $ Bittrex ", "bittrex", false),
|
||||||
summaryList: summaryList{},
|
summaryList: summaryList{},
|
||||||
updateInterval: Config.UInt("wtf.mods.bittrex.updateInterval", 10),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
started = false
|
started = false
|
||||||
@ -112,7 +110,7 @@ func (widget *Widget) Refresh() {
|
|||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
widget.updateSummary()
|
widget.updateSummary()
|
||||||
time.Sleep(time.Second * time.Duration(widget.updateInterval))
|
time.Sleep(time.Second * time.Duration(widget.RefreshInterval()))
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
started = true
|
started = true
|
||||||
|
@ -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>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>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>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>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>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">
|
</span><span class="w"> </span>displayName<span class="p">:</span><span class="w"> </span><span class="m">Bitcoin</span><span class="w">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user