Sign in to follow this  
Followers 0
Kaptein

Relinquish cpu

3 posts in this topic

I'm implementing a wait() function, which I want to be multiplatform, and hopefully not use sleep().

 

Are there any functions on win and linux that allows you to just relinquish cpu time immediately?

I realize that sleep() does this, but I want to know what the alternatives are?

I'm guessing there are none, but I'm asking anyways.

 

 

0

Share this post


Link to post
Share on other sites

I do not like the sleep function because it causes a fixed delay.  I would loop a little bit and use the clock function.  It is under the ctime namespace or I believe time.h

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0