c++: Schedule function call in the future?

Posted by User on Stack Overflow See other posts from Stack Overflow or by User
Published on 2012-04-03T04:11:55Z Indexed on 2012/04/03 5:29 UTC
Read the original article Hit count: 222

Filed under:
|
|
|

Using Visual C++ with MFC. When a certain event occurs in my code, I want to set a function to be called 10 seconds later to perform some activity. The handling of the event happens in a static library that doesn't have any direct links to MFC (and I'd like to keep it that way).

How can I schedule a function to be called at some point in the future? Use a Timer I guess? How do I decouple the Timer (which is an MFC dependency) so my business code doesn't have a direct dependency on the GUI? Or maybe something else besides a timer?

© Stack Overflow or respective owner

Related posts about c++

Related posts about visual-c++