The best approach to sleep to get a specified duration working with Boost is to initial produce a time duration object, after which you can pass this to the sleep means of the special boost::this_thread https://bookmarkworm.com/story17996458/about-grow-threads-audience