From 18e2e8966ce65a6593b9a530554da158cd97d79c Mon Sep 17 00:00:00 2001 From: timglabisch Date: Thu, 17 Aug 2023 12:44:30 +0200 Subject: [PATCH] calculating the latency fails (hardware issue)? --- mehsh_check/src/udp_echo/analyzer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mehsh_check/src/udp_echo/analyzer.rs b/mehsh_check/src/udp_echo/analyzer.rs index 2eb16da..05fdebc 100644 --- a/mehsh_check/src/udp_echo/analyzer.rs +++ b/mehsh_check/src/udp_echo/analyzer.rs @@ -83,7 +83,7 @@ impl AnalyzerStatsEntry { match self.resp_time { Some(resp) => Some( resp.duration_since(self.req_time) - .expect("could not calculate duration") + .unwrap_or(Duration::from_micros(0)) .as_micros(), ), _ => None,