mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-01 21:54:39 -04:00
Unify sleepy code to std::thread sleep
This commit is contained in:
+1
-5
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user