-
High Resolution Version of Sleep() in Windows
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.
-
I don't know if this is really feasible: putting a process to sleep means much more than just suspending its CPU usage: it means releasing some resources, marking a few flags, signaling the kernel, and performing a context switch (that is, waking up another process). You can't accomplish these operations in a few nanoseconds so the real question here is: what do you want to accomplish? If it's just delaying the current execution of the process, I think wait() would be a better choice. If it's letting other processes utilize the CPU, then Sleep() or sleep() would do but for longer time spans than micro seconds.
Danny Kalev
Similar Threads
-
By nospam in forum Database
Replies: 1
Last Post: 08-29-2001, 09:14 AM
-
By Dharmesh in forum .NET
Replies: 0
Last Post: 08-03-2001, 04:45 AM
-
By myLittleTools.net in forum web.announcements
Replies: 0
Last Post: 03-10-2001, 01:35 PM
-
By Todd B - Agendum Software in forum vb.announcements
Replies: 0
Last Post: 11-05-2000, 12:53 AM
-
By Todd B - Agendum Software in forum web.announcements
Replies: 0
Last Post: 11-05-2000, 12:53 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|