How to wake a C++ 11 thread periodically?
<p>I would be grateful for some pointers on how to wake a C++ 11 thread periodically (say every 100ms). The platform is Linux and the language C++. I came across this solution:</p>

<p><a href="https://stackoverflow.com/questions/30425772/c-11-calling-a-c-function-periodically">C++ 11: Calling a C++ function periodically</a></p>

<p>but there they call a callback function and then sleep for the timer interval. That means that the actual period is the function execution time + the interval. I want to call the callback at a constant interval, irrespective of its execution time.</p>

<p>I wonder if Boost would help? But I would prefer not to use it, as this project is not multi-platform and I want to minimize the use of third party libraries.</p>

<p>Perhaps combining a POSIX timer with a C++ thread is a way forward? I'm not sure exactly how that would work.</p>

<p>Any suggestions as to how to get started would be appreciated.</p>