mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-27 06:08:37 -05:00
Unify sleepy code to std::thread sleep
This commit is contained in:
parent
89332d03b8
commit
22ed3d3b27
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user