I am looking for an way to handle in c++ and linux timers like in java (timer.schedule) or in Win32/MFC (SetTimer) with a callback after elapsed time. What about support of multiple callbacks with different times???
The SIG_ALRM/alarm does only support 1 callback with bad time resolution of 1 second. But I need multiple callbacks with short intervalls like that:
Timer t1 = new Timer (func1, 1000);
Timer t2 = new Timer (func2, 60);
Can anybody give me a tip??? I know how to implement with multiple threads and sleep but is there no implementation out there???