I (last year, last job) rewrote the code for an embedded system for the US Government (actually the Army, but close enough). The system is (we're working on this -> LINUX) currently "running" Dr. DOS. The entire system is located on an old 8-bit STD Bus with a few cards that react like frozen oil. The original programmer put in wait states in the form
Code:
for (i = 0; i < 25000; i++)
continue;
which vexs me greatly. I'd like to (make it processor independant) find a way to do the nanosleep available in GLibC for Linux. Delay isn't good enough as it only allows me to wait on the hunderths of a second range.
Any Ideas anyone?