#if TRUE
RETAILMSG(TRUE, (TEXT("******** +delay 2s/r/n")));
for (int nCount = 0; nCount < 99 * 1000 * 1000 * 2; nCount++)
;
RETAILMSG(TRUE, (TEXT("******** -delay 2s/r/n")));
#endif
void Delay_us(int n)
{
LARGE_INTEGER litmp;
LONGLONG QPart1,QPart2;
double dfMinus,dfFreq,dfTim;
QueryPerformanceFrequency(&litmp);
dfFreq = (double)litmp.QuadPart;
QueryPerformanceCounter(&litmp);
QPart1 = litmp.QuadPart;
do
{
QueryPerformanceCounter(&litmp);
QPart2 = litmp.QuadPart;
dfMinus = (double)(QPart2-QPart1);
dfTim = dfMinus/dfFreq;
}while(dfTim<0.000001*n);
}