Re: interrupable sleep
- Posted by jimcbrown (admin) Dec 31, 2012
- 1285 views
ghaberek said...
SnakeCharmer said...
I need a function, that sleep for some seconds. Waiting can be interrupted with the action. In such case that function has to return TRUE.
This should do the trick. Just replace my get_key() with your isInterrupted().
I think what is really wanted is an implementation for isInterrupted().
ghaberek said...
SnakeCharmer said...
By the way, function isInterrupted has to return TRUE, if the castor of a mouse was turned. How to do it? Perhaps to reconstruct function?
I have no idea what you mean by this.
-Greg
I think it means: if the cursor of the mouse was moved.