title: How to do repeated timed-callback in standard C++?
body: <p>How can I do repeated timed-callback in standard C++?</p>
  
  <p>I've done this in C by using <code>SDL_AddTimer</code>, which calls a <code>Uint32 (*callback)(Uint32, void*)</code> after its first argument in milliseconds has passed, get the return value to wait for that moment and call again, and repeat this until either the return value is 0 or <code>SDL_RemoveTimer</code> was called.</p>
  
  <p>I think I can wrap this using variadic templates, or even implement it with a linked list of threads, but I'd prefer a standard library solution if there is one. I was looking at <code>std::future</code> and its related classes, but I'm still not clear how they are used.</p>
  
  <p>A very simple piece of code would help very much.</p>