Skip to content

Commit

Permalink
Linter? i hardly know 'er
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Sep 2, 2024
1 parent eac466d commit 092be84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ntcore/src/main/native/cpp/net/TimeSyncClientServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ void wpi::TimeSyncClient::UdpCallback(uv::Buffer& buf, size_t nbytes,

if (pong.version != 1) {
fmt::println("Bad version from server?");
auto end{std::chrono::high_resolution_clock::now()};
return;
}
if (pong.message_id != 2) {
Expand Down Expand Up @@ -282,7 +281,8 @@ void wpi::TimeSyncClient::Start() {
using namespace std::chrono_literals;
m_pingTimer->timeout.connect(&wpi::TimeSyncClient::Tick, this);

m_loopRunner.ExecSync([this](uv::Loop&) { m_pingTimer->Start(1s, 1s); });
m_loopRunner.ExecSync(
[this](uv::Loop&) { m_pingTimer->Start(m_loopDelay, m_loopDelay); });
}

void wpi::TimeSyncClient::Stop() {
Expand Down
4 changes: 2 additions & 2 deletions ntcore/src/main/native/include/net/TimeSyncClientServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class TimeSyncServer {
unsigned flags);

public:
TimeSyncServer(int port = 5810,
explicit TimeSyncServer(int port = 5810,
std::function<uint64_t()> timeProvider = nt::Now);

/**
Expand Down Expand Up @@ -92,8 +92,8 @@ class TimeSyncClient {
SharedTimerPtr m_pingTimer;

std::string m_serverIP;

int m_serverPort;

std::chrono::milliseconds m_loopDelay;

std::mutex m_offsetMutex;
Expand Down

0 comments on commit 092be84

Please sign in to comment.