genesys: use usleep instead of std::this_thread::sleep_for to re-enable thread less compile

Fixes:

  genesys/scanner_interface_usb.cpp: In member function ‘virtual void genesys::ScannerInterfaceUsb::sleep_us(unsigned int)’:
  genesys/scanner_interface_usb.cpp:484:10: error: ‘std::this_thread’ has not been declared
    484 |     std::this_thread::sleep_for(std::chrono::microseconds{microseconds});
        |          ^~~~~~~~~~~

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
merge-requests/619/head
Peter Seiderer 2021-03-31 22:51:03 +02:00
rodzic eb702d33c4
commit 691d774f75
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -43,7 +43,6 @@
#include "scanner_interface_usb.h"
#include "low.h"
#include <thread>
namespace genesys {
@ -481,7 +480,7 @@ void ScannerInterfaceUsb::sleep_us(unsigned microseconds)
if (sanei_usb_is_replay_mode_enabled()) {
return;
}
std::this_thread::sleep_for(std::chrono::microseconds{microseconds});
usleep(microseconds);
}
void ScannerInterfaceUsb::record_progress_message(const char* msg)