refactor(client): use SignedDuration for effective RTT to support negative values

Simplify RttSample by merging signed and unsigned fields into a single SignedDuration for adjusted and effective RTT. This ensures accurate reporting and statistics when server processing time exceeds raw RTT.
This commit is contained in:
Nils Andreas Svee committed 2026-05-17 21:30:51 +07:00
1 parent 37de7c96a1
commit bec56d4114
14 files changed
+207 -86

No files matched your search

+1 -1
View File
@@ -129,7 +129,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
while let Ok(event) = events.recv() {
match event {
ClientEvent::EchoReply { seq, rtt, .. } => {
println!("seq={seq} rtt_us={}", rtt.effective.as_micros());
println!("seq={seq} rtt_us={}", rtt.effective.ns / 1_000);
}
ClientEvent::SessionClosed { .. } => break,
_ => {}