(&self)
| 60 | |
| 61 | impl Info { |
| 62 | pub fn latency(&self) -> Option<Duration> { |
| 63 | // only approximation, this is wrong but the best we have for now |
| 64 | self.last_rtt.map(|rtt| rtt / 2) |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | const PEERING_MIN_DIAL_SECS: Duration = Duration::from_secs(1); // 1 second min between redials |