Unify sleepy code to std::thread sleep

This commit is contained in:
Charles J. Cliffe 2015-08-14 21:20:07 -04:00
parent 89332d03b8
commit 22ed3d3b27
2 changed files with 2 additions and 10 deletions

View File

@ -783,11 +783,7 @@ void AppFrame::OnIdle(wxIdleEvent& event) {
demodWaterfallCanvas->processInputQueue();
if (!this->IsActive()) {
#ifndef _WIN32
usleep(25000);
#else
Sleep(25);
#endif
std::this_thread::sleep_for(std::chrono::milliseconds(25));
}
event.RequestMore();

View File

@ -36,11 +36,7 @@ void FFTVisualDataThread::run() {
while(!terminated) {
#ifndef _WIN32
usleep(15000);
#else
Sleep(15);
#endif
std::this_thread::sleep_for(std::chrono::milliseconds(15));
int fftSize = wproc.getDesiredInputSize();