Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

High resolution version of Sleep() in Windows

Status
Not open for further replies.

MichaelLEvans

Programmer
Mar 9, 2005
2
US
Has anyone come across a way to sleep (suspend execution of current process while releasing CPU resources in the meantime) for less than a millisecond in Windows? I know it has been done by third parties such as with the XBO LLADRV project, but I cannot get even enough support from them to enable their software in my project. Ideally, I need something like the unix usleep() function which will do a processor-friendly sleep for some number of microseconds or nanoseconds. The LLADRV project supposedly does this for Windows through low-level access to the OS using their LladrvWaitPreciseTime() function.

I am using MSVC++ .Net 2003. Thanks for any leads.
 
As far as I know Windows time-slice period is longer than 1 millisecond. So it's senseless to try suspend a thread with micro- (and nano-;) second intervals (may be with special third-party real time extensions?)...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top