6#include <aegis2d/net/export.hpp>
24 using Duration = std::chrono::steady_clock::duration;
33 [[nodiscard]]
bool has_estimate() const noexcept {
return samples_ > 0; }
49 [[nodiscard]] std::uint64_t
samples() const noexcept {
return samples_; }
55 std::uint64_t samples_ = 0;
Smoothed round trip time and its variation, from round trip samples.
Definition rtt.hpp:21
Duration jitter() const noexcept
Jitter: the smoothed variation of the samples (RTTVAR).
Definition rtt.hpp:41
Duration smoothed() const noexcept
Smoothed round trip time (SRTT).
Definition rtt.hpp:37
Duration latest() const noexcept
Last sample taken.
Definition rtt.hpp:45
std::uint64_t samples() const noexcept
Number of samples taken.
Definition rtt.hpp:49
bool has_estimate() const noexcept
Whether a sample was taken.
Definition rtt.hpp:33
std::chrono::steady_clock::duration Duration
Durations of the samples and of the estimate.
Definition rtt.hpp:24
void add_sample(Duration sample) noexcept
Takes a round trip sample into the estimate.
Binary serialization, UDP/TCP sockets and the network thread.
Definition binary.hpp:14