Often such apis (select/poll/epoll) have an option to wait with a timeout, so if you have a bunch of different timers, you can manage them yourself (e.g. on a heap) and set the timeout to the nearest timer
Of course if you have epoll you probably have timerfd, wich does give you a unified interface, just not as portable
Comments
Often such apis (select/poll/epoll) have an option to wait with a timeout, so if you have a bunch of different timers, you can manage them yourself (e.g. on a heap) and set the timeout to the nearest timer
Of course if you have epoll you probably have timerfd, wich does give you a unified interface, just not as portable