mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-25 22:46:34 +08:00
优化代码
This commit is contained in:
@@ -100,8 +100,7 @@ func (this *TrafficStatManager) Add(serverId int64, domain string, bytes int64,
|
||||
|
||||
this.totalRequests++
|
||||
|
||||
timestamp := utils.UnixTime() / 300 * 300
|
||||
|
||||
timestamp := utils.FloorUnixTime(300)
|
||||
key := strconv.FormatInt(timestamp, 10) + strconv.FormatInt(serverId, 10)
|
||||
this.locker.Lock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user