diff --git a/ntcore/src/main/native/cpp/Dispatcher.cpp b/ntcore/src/main/native/cpp/Dispatcher.cpp index f3bff4ded1..560986ca10 100644 --- a/ntcore/src/main/native/cpp/Dispatcher.cpp +++ b/ntcore/src/main/native/cpp/Dispatcher.cpp @@ -203,9 +203,9 @@ void DispatcherBase::Stop() { } void DispatcherBase::SetUpdateRate(double interval) { - // don't allow update rates faster than 10 ms or slower than 1 second - if (interval < 0.01) - interval = 0.01; + // don't allow update rates faster than 5 ms or slower than 1 second + if (interval < 0.005) + interval = 0.005; else if (interval > 1.0) interval = 1.0; m_update_rate = static_cast(interval * 1000); @@ -220,8 +220,8 @@ void DispatcherBase::Flush() { auto now = std::chrono::steady_clock::now(); { std::scoped_lock lock(m_flush_mutex); - // don't allow flushes more often than every 10 ms - if ((now - m_last_flush) < std::chrono::milliseconds(10)) return; + // don't allow flushes more often than every 5 ms + if ((now - m_last_flush) < std::chrono::milliseconds(5)) return; m_last_flush = now; m_do_flush = true; }