Chore: export reset manager statistic api (#476)

This commit is contained in:
Kr328 2020-01-11 00:20:10 +08:00 committed by Dreamacro
parent e68c0d088b
commit 6b7144acce

View file

@ -61,6 +61,15 @@ func (m *Manager) Snapshot() *Snapshot {
}
}
func (m *Manager) ResetStatistic() {
m.uploadTemp = 0
m.uploadBlip = 0
m.uploadTotal = 0
m.downloadTemp = 0
m.downloadBlip = 0
m.downloadTotal = 0
}
func (m *Manager) handle() {
go m.handleCh(m.upload, &m.uploadTemp, &m.uploadBlip, &m.uploadTotal)
go m.handleCh(m.download, &m.downloadTemp, &m.downloadBlip, &m.downloadTotal)