Now all indicator updates properly

This commit is contained in:
eleksir
2024-09-23 19:05:45 +03:00
parent 1a4ab136dc
commit 5bb259a30c
15 changed files with 228 additions and 231 deletions

View File

@@ -8,15 +8,15 @@ import (
)
// UpdateLaStats вытаскивает показание LA за последнюю минуту.
func (c MyConfig) UpdateLaStats() {
func (c *MyConfig) UpdateLaStats() {
for {
l, _ := load.Avg()
lav := fmt.Sprintf("%.2f", l.Load1)
if c.La != lav {
c.La = lav
c.UpdateReady <- true
if c.Values.La != lav {
c.Values.La = lav
c.Channels.UpdateReady <- true
}
time.Sleep(3 * time.Second)