It is almost not important what you are going to use - a select() , epoll() , usleep() , settimer() . Some methods may take a higher resolution timeout; some may not. But Linux is not an operating system and should not even expect it to wake your process at this time. Now, even if you start the processor, the kernel can easily pause your process if it decides to allocate this processor for some other process or interrupt handler.
From the point of view of the API (as well as the latest trends), you should probably stick to timerfd() - you can tell what clock it goes well with other Linux event dispatch mechanisms (epoll, AIO, etc.).
Other than that, its out of your control as a programmer. It usually takes a lot of effort to get closer to real Linux behavior. It ranges from creating a customizable fixed kernel and proximity settings for the whole world, including interrupt protection, BIOS fix, and hardware tuning.
Be that as it may, assuming you are launching a new vanilla core on the x86_64 product server, which is not very busy, expect your wake-up time to be somewhere around 50 microseconds (you can easily compare it to get a rough idea for your system).
user405725
source share