Create timer queue in Linux using C++ [closed]

2019-07-19 23:25发布

问题:

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.

回答1:

Can't you use libevent for this ?