2 ms·
yes, these days you can get a file descriptor for pretty much everything so epoll is sufficient. I think that epoll timeout granularity is still in millisecond
by gpderetta 6y ago
yes, these days you can get a file descriptor for pretty much everything so epoll is sufficient.
I think that epoll timeout granularity is still in milliseconds, so if you want to build high res timers on top of it for your event loop you have to either use zero timeout polling or use an explicit timerfd which adds overhead. I guess you can use plain ppoll (which has ns resolution timeouts) on the epoll fd.
- cycloptic 6y agoThis is corrected in io_uring too, if you use IORING_OP_TIMEOUT that takes a timespec64.