mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
replced usleep with chrono and thread
This commit is contained in:
parent
5671f1c87b
commit
ab2eb607c8
@ -22,6 +22,7 @@
|
||||
#include "container_utils.h"
|
||||
#include <future>
|
||||
#include <vector>
|
||||
#include <chrono>
|
||||
|
||||
multiSlsDetector::multiSlsDetector(int id, bool verify, bool update)
|
||||
: detId(id), sharedMemory(0), thisMultiDetector(0),
|
||||
@ -3726,8 +3727,8 @@ void multiSlsDetector::processData() {
|
||||
if (getJoinThreadFlag()) {
|
||||
break;
|
||||
}
|
||||
usleep(100 * 1000); // 20ms need this else connecting error to
|
||||
// receiver (too fast)
|
||||
//otherwise error when connecting to the receiver too fast
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user