0

I need a function equivalent to Doevents() in c++ on linux. I found the equivalent of this function in c++ but nothing works in linux, they are using Windows.h.

doevents-equivalent-for-c and Doevents() in c++

I need it for this function:

void FTDI_Mgt::waitN_Milliseconds(int _msec)
{
    if (_msec < 1)
    {
        return;
    }
     auto _desired = std::chrono::steady_clock::now() + std::chrono::milliseconds(_msec);

    while (std::chrono::steady_clock::now() < _desired)     
    {
        DoEvents();     
    }
}

I'm stuck, could you help please?

naoussa
  • 107
  • 1
  • 8
  • 2
    What are you trying to do on Linux that needs this function? – n. m. could be an AI Jul 06 '21 at 09:45
  • @n.1.8e9-where's-my-sharem. I'm writing a code trying to read from FTDI’s D2XX drivers, I'm using it in waitN_Milliseconds(int _msec) function void FTDI_Mgt::waitN_Milliseconds(int _msec) { if (_msec < 1) { return; } auto _desired = std::chrono::steady_clock::now() + std::chrono::milliseconds(_msec); while (std::chrono::steady_clock::now() < _desired) { DoEvents(); } } – naoussa Jul 06 '21 at 10:49
  • What should this `DoEvents` function **do**? There are no system-wide events or event queues or event dispatching in Linux. Is this some kind of GUI application? – n. m. could be an AI Jul 06 '21 at 11:13

0 Answers0