61 using SharedUdpPtr = std::shared_ptr<uv::Udp>;
62 using SharedTimerPtr = std::shared_ptr<uv::Timer>;
64 EventLoopRunner m_loopRunner{};
67 std::function<uint64_t()> m_timeProvider;
70 SharedTimerPtr m_pingTimer;
72 std::string m_serverIP;
75 std::chrono::milliseconds m_loopDelay;
77 std::mutex m_offsetMutex{};
78 Metadata m_metadata{};
84 frc::MedianFilter<int64_t> m_lastOffsets{30};
88 void UdpCallback(uv::Buffer& buf,
size_t nbytes,
const sockaddr& sender,
93 std::chrono::milliseconds ping_delay);