Need a Microsecond Delay Fnc
-
I'm working on a project that requires a delay time in microseconds. Anybody have any ideas?
-
I'm working on a project that requires a delay time in microseconds. Anybody have any ideas?
What language / platform u use? He who controls others may be powerful,
But he who has mastered himself is mightier still. -
What language / platform u use? He who controls others may be powerful,
But he who has mastered himself is mightier still.Sorry. I'm using MFC - Visual C++ on Windows XP
-
Sorry. I'm using MFC - Visual C++ on Windows XP
The shortest period you can give up a time slice for is around 14 milliseconds on a Windows system. I think anytime you Sleep(...) you will sleep for some multiple of approx 14 milliseconds. Windows is not real time. :(( If you want to spin in a while loop to delay look into QueryPerformanceCounter in the msdn. J
-
I'm working on a project that requires a delay time in microseconds. Anybody have any ideas?
WinMM.lib gives possibility of one millisecond callbacks on a seperate thread, which one can boost priority to make sure free-running. timeSetTimer & timeKillTimer are the relevant functions, viz. MSDN Better than (+/-) 7mSecs, but perhaps not good enough? Lymington
-
I'm working on a project that requires a delay time in microseconds. Anybody have any ideas?
If you truly need to delay in microseconds you will probably have to resort to assembly language and NOOPs. There is absolutely no guarantee that this will be deterministic though. __________________________________________ a two cent stamp short of going postal.