diff options
Diffstat (limited to 'src/transport/paths.rs')
| -rw-r--r-- | src/transport/paths.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/transport/paths.rs b/src/transport/paths.rs index 643a238..a9bac49 100644 --- a/src/transport/paths.rs +++ b/src/transport/paths.rs @@ -420,6 +420,11 @@ impl Paths { self.table.lock_or_recover().rank(usable, Instant::now()) } + /// The smoothed round-trip time of the path to `address`, if measured. + pub(crate) fn rtt(&self, address: &str) -> Option<Duration> { + self.table.lock_or_recover().paths.get(address)?.rtt + } + /// What paths knows about each of `addresses`. pub(crate) fn info(&self, addresses: &[String]) -> Vec<PathInfo> { let now = Instant::now(); |
