From 1635cba82772a1a487fa026002c61d9e2145a518 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Tue, 16 Aug 2016 12:07:17 -0700 Subject: [PATCH] Reduced minimum update rate from 100 ms to 10 ms. (#89) --- src/Dispatcher.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Dispatcher.cpp b/src/Dispatcher.cpp index 470122d3f6..22c9f62293 100644 --- a/src/Dispatcher.cpp +++ b/src/Dispatcher.cpp @@ -151,9 +151,9 @@ void DispatcherBase::Stop() { } void DispatcherBase::SetUpdateRate(double interval) { - // don't allow update rates faster than 100 ms or slower than 1 second - if (interval < 0.1) - interval = 0.1; + // don't allow update rates faster than 10 ms or slower than 1 second + if (interval < 0.01) + interval = 0.01; else if (interval > 1.0) interval = 1.0; m_update_rate = static_cast(interval * 1000); @@ -168,8 +168,8 @@ void DispatcherBase::Flush() { auto now = std::chrono::steady_clock::now(); { std::lock_guard lock(m_flush_mutex); - // don't allow flushes more often than every 100 ms - if ((now - m_last_flush) < std::chrono::milliseconds(100)) + // don't allow flushes more often than every 10 ms + if ((now - m_last_flush) < std::chrono::milliseconds(10)) return; m_last_flush = now; m_do_flush = true;