to perform an efficient delay you need to use a non standard function provided by the operating system for example sleep(...) in Linux or Sleep(...) in Windows.
There is no standard way of efficiently delaying without using processor cycles.
You need a nonstandard high-resolution elapsed-time function even if your delay function is inefficent and uses processor cycles. Either way, you are dependent on nonstandard OS-specific functions. Therefore, a delay function is inherently nonportable.
Comment