A new compat/delay.cpp
The nanosleep version of delay.cpp can not deal with high udp bandwith under some old linux kernel such as 2.6.18 used by RHEL5.
The legacy implementation of nanosleep() is based on the normal kernel timer mechanism, which has a resolution
of 1/HZ s (see time(7)). Therefore, nanosleep() pauses always for at least the specified time, however it can
take up to 10 ms longer than specified until the process becomes runnable again. For the same reason, the value
returned in case of a delivered signal in *rem is usually rounded to the next larger multiple of 1/HZ s.
So we have to detect the precision of nanosleep, if the precision is low, we have to rollback the busy-loop version of delay_loop.
Here is the new delay.cpp