Remove time source override (#1582)

This commit is contained in:
Matt
2024-11-16 20:09:33 -08:00
committed by GitHub
parent eff95c09f1
commit 05dcfa2a13
4 changed files with 9 additions and 13 deletions

View File

@@ -152,10 +152,9 @@ void wpi::tsp::TimeSyncClient::UdpCallback(uv::Buffer& buf, size_t nbytes,
wpi::tsp::TimeSyncClient::TimeSyncClient(std::string_view server,
int remote_port,
std::chrono::milliseconds ping_delay,
std::function<uint64_t()> timeProvider)
std::chrono::milliseconds ping_delay)
: m_logger(::ClientLoggerFunc),
m_timeProvider(timeProvider),
m_timeProvider(nt::Now),
m_udp{},
m_pingTimer{},
m_serverIP{server},

View File

@@ -97,10 +97,9 @@ void wpi::tsp::TimeSyncServer::UdpCallback(uv::Buffer& data, size_t n,
// pong.client_time, pong.server_time);
}
wpi::tsp::TimeSyncServer::TimeSyncServer(int port,
std::function<uint64_t()> timeProvider)
wpi::tsp::TimeSyncServer::TimeSyncServer(int port)
: m_logger{::ServerLoggerFunc},
m_timeProvider{timeProvider},
m_timeProvider{nt::Now},
m_udp{},
m_port(port) {}