usleep() for windows kernel

Started by
5 comments, last by Leadorn 21 years, 10 months ago
Hail guys Is there a function like usleep(); for windows. usleep(); handles over the control to the kernel for x ms. If you don''t understand what I mean look here http://www.fsmlabs.com/developers/docs/html/susv2/xsh/usleep.html
Advertisement
sleep() perhaps?
quote:Original post by Leadorn
Is there a function like usleep(); for windows. usleep(); handles over the control to the kernel for x ms.

The usleep function is for microseconds (μs), not milliseconds (ms).

Owww im so sorry.

You must have much time to spend writing shit on this forum!!
quote:Original post by Leadorn
You must have much time to spend writing shit on this forum!!

I was doing that to helf inform JonStelly more than I was trying to correct you. He gave you a valid answer based upon what you''d written. You''re very considerate.

Okey.
By the spec, usleep and sleep are functionally equivalent. usleep doesn't set any hard timing requirements other than "later", which is exactly how Sleep behaves
Sleep(0) or Sleep(1) ought to do it
{timeBeginPeriod(1);Sleep(1);timeEndPeriod(1);}

Oh hey, you might be able to emulate a microsecond sleep using a waitable timer (iffy though).

[edited by - Magmai Kai Holmlor on June 6, 2002 1:23:08 AM]
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement