mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-02-03 09:44:26 -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();
|
demodWaterfallCanvas->processInputQueue();
|
||||||
|
|
||||||
if (!this->IsActive()) {
|
if (!this->IsActive()) {
|
||||||
#ifndef _WIN32
|
std::this_thread::sleep_for(std::chrono::milliseconds(25));
|
||||||
usleep(25000);
|
|
||||||
#else
|
|
||||||
Sleep(25);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
event.RequestMore();
|
event.RequestMore();
|
||||||
|
@ -36,11 +36,7 @@ void FFTVisualDataThread::run() {
|
|||||||
|
|
||||||
while(!terminated) {
|
while(!terminated) {
|
||||||
|
|
||||||
#ifndef _WIN32
|
std::this_thread::sleep_for(std::chrono::milliseconds(15));
|
||||||
usleep(15000);
|
|
||||||
#else
|
|
||||||
Sleep(15);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int fftSize = wproc.getDesiredInputSize();
|
int fftSize = wproc.getDesiredInputSize();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user