I have implemented a project in Windows using C++ that creates a timer queue, add entries to it, perform a callback function when the timer expires,waits for next timer, etc. It was possible using the Windows functions CreateTimer
, CreateTimerQueueTimer
, CreateTimer
,etc.
Now my question is how to do the same thing in Linux using C++? Is there some API ? Is timer_create
a good option for doing this? It will be much helpful if an example is also provided.
Can't you use libevent for this ?