mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-10-15 12:04:06 +00:00
Treat int as int32
This commit is contained in:
@@ -109,7 +109,7 @@ func (h *HealthPingRTTS) getStatistics() *HealthPingStats {
|
||||
stats.Min = 0
|
||||
return stats
|
||||
}
|
||||
stats.Average = time.Duration(int(sum) / cnt)
|
||||
stats.Average = sum / time.Duration(cnt)
|
||||
var std float64
|
||||
if cnt < 2 {
|
||||
// no enough data for standard deviation, we assume it's half of the average rtt
|
||||
|
||||
Reference in New Issue
Block a user