interrupable sleep
- Posted by SnakeCharmer Dec 30, 2012
- 1344 views
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.
include std/types.e function heDidNotWait(integer Seconds) for i = 1 to Seconds do if isInterrupted() then return TRUE end if end for return FALSE end function
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?