mirror of
https://github.com/net-byte/vtun
synced 2024-03-14 10:50:03 +08:00
16 lines
251 B
Go
16 lines
251 B
Go
package counter
|
|
|
|
import "sync/atomic"
|
|
|
|
var TotalReadByte uint64 = 0
|
|
|
|
var TotalWriteByte uint64 = 0
|
|
|
|
func IncrReadByte(n int) {
|
|
atomic.AddUint64(&TotalReadByte, uint64(n))
|
|
}
|
|
|
|
func IncrWriteByte(n int) {
|
|
atomic.AddUint64(&TotalWriteByte, uint64(n))
|
|
}
|