mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
chore: add upTotal and downTotal data to /traffic restful api
This commit is contained in:
@@ -72,6 +72,10 @@ func (m *Manager) Now() (up int64, down int64) {
|
||||
return m.uploadBlip.Load(), m.downloadBlip.Load()
|
||||
}
|
||||
|
||||
func (m *Manager) Total() (up, down int64) {
|
||||
return m.uploadTotal.Load(), m.downloadTotal.Load()
|
||||
}
|
||||
|
||||
func (m *Manager) Memory() uint64 {
|
||||
m.updateMemory()
|
||||
return m.memory
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
//go:build android && cmfa
|
||||
|
||||
package statistic
|
||||
|
||||
func (m *Manager) Total() (up, down int64) {
|
||||
return m.uploadTotal.Load(), m.downloadTotal.Load()
|
||||
}
|
||||
Reference in New Issue
Block a user