From: Michael Tremer Date: Tue, 11 Nov 2025 17:46:24 +0000 (+0000) Subject: legacy-gateway-latency4: Store all times in seconds X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dafdc2fbf60e140049b3523e3377f6666a0212da;p=telemetry.git legacy-gateway-latency4: Store all times in seconds Signed-off-by: Michael Tremer --- diff --git a/src/daemon/sources/legacy-gateway-latency4.c b/src/daemon/sources/legacy-gateway-latency4.c index c799425..26cc995 100644 --- a/src/daemon/sources/legacy-gateway-latency4.c +++ b/src/daemon/sources/legacy-gateway-latency4.c @@ -31,6 +31,7 @@ #include "../command.h" #include "../ctx.h" #include "../source.h" +#include "../time.h" #include "legacy-gateway-latency4.h" static int fetch_default_gateway(td_ctx* ctx, @@ -156,6 +157,10 @@ static int legacy_gateway_latency_on_success(td_ctx* ctx, if (r < 0) return r; + // Convert the latency and standard deviation to seconds + avg = MSEC_TO_SEC(avg); + mdev = MSEC_TO_SEC(mdev); + // Convert the loss loss /= 100.0;