I am in the stage of upgrading some legacy C++ code to C++11 under Linux using gcc. When trying to set priorities I came up with the following question. Could there be any advantage in exchanging a call to usleep with a call to std::this_thread::sleep_for? In the code I am talking about the running thread is supposed to wait for a very short period. Therefore I don't need any advanced features like interrupting the sleep.
Aucun commentaire:
Enregistrer un commentaire