From 134c8c5acb5b1de5ade501e65bd42f2312dc58d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=89=E9=B2=9C=E6=A3=AE=28KEVI=5F=29?= Date: Sun, 20 Oct 2024 10:42:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20TCPPing=20=E5=BB=B6?= =?UTF-8?q?=E8=BF=9F=E7=BB=9F=E8=AE=A1=E7=B2=BE=E5=BA=A6=20(#76)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/agent/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/agent/main.go b/cmd/agent/main.go index 8a919dc..f6d310c 100644 --- a/cmd/agent/main.go +++ b/cmd/agent/main.go @@ -495,7 +495,7 @@ func handleTcpPingTask(task *pb.Task, result *pb.TaskResult) { result.Data = err.Error() } else { conn.Close() - result.Delay = float32(time.Since(start).Milliseconds()) + result.Delay = float32(time.Since(start).Microseconds()) / 1000.0 result.Successful = true } }