Sleep only when not visible..

This commit is contained in:
Charles J. Cliffe 2015-08-13 18:03:06 -04:00
parent 8000e97a8c
commit 1781188dfe
1 changed files with 6 additions and 3 deletions

View File

@ -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();
}