diff options
| author | ache <ache@ache.one> | 2026-08-04 16:53:42 +0200 |
|---|---|---|
| committer | ache <ache@ache.one> | 2026-08-04 17:00:54 +0200 |
| commit | 1d1736e742e2328d12503ee81ac51e1c2de3e35e (patch) | |
| tree | d83dd4654b4186414e3c9b144f20b1d9b289957d /src/pinger.rs | |
| parent | Add stats computing (diff) | |
Print stats
Diffstat (limited to 'src/pinger.rs')
| -rw-r--r-- | src/pinger.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pinger.rs b/src/pinger.rs index ef87cbf..d7d052b 100644 --- a/src/pinger.rs +++ b/src/pinger.rs @@ -5,7 +5,7 @@ use tokio::task; pub enum PingResult { NoPingErr { id: u32, error: String }, - Ping { rrt: u64, ttl: u32, id: u32 }, + Ping { rtt: u64, ttl: u32, id: u32 }, } pub fn spawn_ping(target: IpAddr, tx: Sender<PingResult>, id: u32) { @@ -26,7 +26,7 @@ fn do_ping(target: IpAddr, id: u32) -> PingResult { match result { Ok(reply) => PingResult::Ping { - rrt: reply.rtt.as_millis() as u64, + rtt: reply.rtt.as_millis() as u64, ttl: reply.ttl.unwrap_or(0) as u32, id, }, |