Treat int as int32

This commit is contained in:
Fangliding
2026-10-15 00:53:10 +08:00
parent 701af60772
commit 59b0255d83
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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