Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Leadorn

usleep() for windows kernel

This topic is 5891 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!