From 1781188dfe06ad1cdd22f0e13810694510d9825d Mon Sep 17 00:00:00 2001 From: "Charles J. Cliffe" Date: Thu, 13 Aug 2015 18:03:06 -0400 Subject: [PATCH] Sleep only when not visible.. --- src/AppFrame.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index 42f7cf0..9e0e15f 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -765,14 +765,17 @@ void AppFrame::OnIdle(wxIdleEvent& event) { waterfallCanvas->processInputQueue(); demodWaterfallCanvas->processInputQueue(); -#ifndef _WIN32 - usleep(5000); -#endif if (this->IsVisible()) { waterfallCanvas->DoPaint(); demodWaterfallCanvas->DoPaint(); } +#ifndef _WIN32 + else { + usleep(15000); + } +#endif + event.RequestMore(); }