mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-09 02:41:22 +08:00
chore: better atomic using
This commit is contained in:
parent
ecd8facd81
commit
990de84391
@ -114,10 +114,8 @@ func (m *Manager) handle() {
|
|||||||
ticker := time.NewTicker(time.Second)
|
ticker := time.NewTicker(time.Second)
|
||||||
|
|
||||||
for range ticker.C {
|
for range ticker.C {
|
||||||
m.uploadBlip.Store(m.uploadTemp.Load())
|
m.uploadBlip.Store(m.uploadTemp.Swap(0))
|
||||||
m.uploadTemp.Store(0)
|
m.downloadBlip.Store(m.downloadTemp.Swap(0))
|
||||||
m.downloadBlip.Store(m.downloadTemp.Load())
|
|
||||||
m.downloadTemp.Store(0)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user