diff options
Diffstat (limited to 'src/state.rs')
| -rw-r--r-- | src/state.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/state.rs b/src/state.rs index 6021baa..9d567a8 100644 --- a/src/state.rs +++ b/src/state.rs @@ -473,6 +473,12 @@ pub(crate) struct Timing { } impl Timing { + /// How long a round-trip sample stays meaningful (`swarm::rtt`): a few keepalive + /// intervals, since nodes move. + pub(crate) fn rtt_fresh_for(&self) -> Duration { + self.keepalive * 5 + } + // Recommended values // Environment | Keepalive | Notes // --------------------------------------------+-----------+------------------------------------------------------------ |
