"Macgyver" <bh******@dodo.com.au> wrote in message
news:63**************************@posting.google.c om...
does anyone know how to generate a millisecond delay in C, compiling
under Linux? I understand the function sleep() will generate a
delay down to a resolution of one second, but I need to be able to
refine this to milliseconds.
There is no way to do so in standard C, the topic of this newsgroup. The
function sleep() is also not part of standard C. The clue is the fact that
the operating system is relevant.
Try asking in comp.unix.programmer <OT> or man 2 nanosleep </OT>.
Note that you seem to be asking for a way to achieve your solution ("How do
I use a sledgehammer to crack a walnut?"), not for a solution to your
problem ("How do I crack a walnut?"). This may well mean you don't get the
best end result.