title: usleep vs std::this_thread::sleep_for, when write/read on a linux serial port
body: <p>I have created a c++ app that needs to connect to a modem via a serial port in order to give AT commands.
  I've followed the following answer: <a href="https://stackoverflow.com/questions/6947413/how-to-open-read-and-write-from-serial-port-in-c">how to open, read, and write from serial port in C</a> and it works great.
  In some point of the code it is mentioned that the working thread should sleep for enough time so that the sending and the reading of the characters to be consistent.  </p>
  
  <pre><code>usleep ((7 + 25) * 100);  
  </code></pre>
  
  <p>Since I'm not familiar enough with the linux system calls like usleep, I want to ask if this call is safe for the other linux processes that running in parallel with my program, or should I use the c++ default thread suspend execution method like std::this_thread::sleep_for?<br>
   In case I use usleep are there things that I should watch for?</p>